[gparted] Add testbuild.sh script (#699881)



commit 70eda277331b0a15e7c42849b6537bd64d7cbe0b
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Tue May 7 22:51:50 2013 +0100

    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

 .gitignore   |    1 +
 testbuild.sh |   34 ++++++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 287f614..0f861b2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,4 +39,5 @@ missing
 mkinstalldirs
 omf.make
 stamp-*
+testbuild.log
 xmldocs.make
diff --git a/testbuild.sh b/testbuild.sh
new file mode 100755
index 0000000..eb1006a
--- /dev/null
+++ b/testbuild.sh
@@ -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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]