Add testbuild.sh script (#699881)

For developers to build GParted in a git repository, logging the top
commit and build results to testbuild.log.  Intended for use with
git-test-sequence to verify every change of a patch set compiles, but
can be used standalone too.

Example usage:
    git-test-sequence origin/master.. testbuild.sh

Further documentation can be found on the GParted web site at page:
    Git Source Code Management
    http://www.gparted.org/git.php

Closes Bug #699881 - testbuild.sh - Builds GParted logging results
This commit is contained in:
Mike Fleetwood 2013-05-07 22:51:50 +01:00 committed by Curtis Gedak
parent 9e2c52d1c7
commit 70eda27733
2 changed files with 35 additions and 0 deletions

1
.gitignore vendored
View File

@ -39,4 +39,5 @@ missing
mkinstalldirs
omf.make
stamp-*
testbuild.log
xmldocs.make

34
testbuild.sh Executable file
View File

@ -0,0 +1,34 @@
#!/bin/sh
# testbuild.sh - Build GParted, logging top commit and build results.
# Command line parameters are passed to autogen.sh.
# MAKEFLAGS environment variable overrides make flags.
#
# Copyright (C) 2013 Mike Fleetwood
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
exec 1>> testbuild.log 2>&1
echo '############################################################'
echo "## Build date: `date`"
echo '############################################################'
git log -1
echo '############################################################'
set -x
if [ "X$MAKEFLAGS" = 'X' ]; then
# Default to using the number of processors to tell make how
# many jobs to run simultaneously
nproc=`grep -c '^processor' /proc/cpuinfo` || nproc=1
MAKEFLAGS="-j $nproc"
export MAKEFLAGS
fi
# Disable bold text escape sequences from gnome-autogen.sh
TERM=
./autogen.sh "${@}" && make clean && make $MAKEFLAGS