]> git.ozlabs.org Git - next-scripts/commitdiff
do_build: Make the parallel logic work, drop set -e
authorMichael Ellerman <mpe@ellerman.id.au>
Fri, 12 Jun 2015 00:26:33 +0000 (10:26 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 19 Jun 2015 05:55:29 +0000 (15:55 +1000)
We can't use 'set -e' because then we bail as soon as the make fails,
and we don't get a chance to look at the result and dump the log.

do_build

index 1a86eb0b8bb645559eef01e99121a365443e9484..ba631f4f30bf2842b20b2ed77b74b85e3decad63 100755 (executable)
--- a/do_build
+++ b/do_build
@@ -6,42 +6,41 @@ set -e
 
 ###ssh "$build_host" /bin/sh -e <<-EOF
 ssh root@"$build_host" unshare -n su $(id -u -n) <<-EOF
-       set -e
 
        echo Building on \$(hostname)
 
        echo \$PATH | grep -q "\$HOME/bin" || export PATH="\$HOME/bin:\$PATH"
        export LANG=C
 
-       cd "$build_dir"
+       cd "$build_dir" || exit 1
 
        export CCACHE_DIR="${build_dir%/*}/.ccache"
        export TMPDIR="${build_dir%/*}/tmp"
 
-       git reset --hard next
-       touch .scmversion
+       git reset --hard next || exit 1
+       touch .scmversion || exit 1
 
        echo Building: x86_64 allmodconfig
        d=../x86_64_allmodconfig
-       [ -d \$d ] || mkdir \$d
+       [ -d \$d ] || mkdir \$d || exit 1
        log_x86=\$d.log
        e=\$d.except
-       echo CONFIG_BUILD_DOCSRC=n >\$e
-       KCONFIG_ALLCONFIG=\$e cross -n -N -a x86_64 -c $gcc_version O=\$d allyesconfig
+       echo CONFIG_BUILD_DOCSRC=n >\$e || exit 1
+       KCONFIG_ALLCONFIG=\$e cross -n -N -a x86_64 -c $gcc_version O=\$d allyesconfig || exit 1
        /usr/bin/time cross -n -N -a x86_64 -c $gcc_version O=\$d -j$j_factor -s > \$log_x86 2>&1 &
 
        echo Building: powerpc ppc64_defconfig
        d=../powerpc_ppc64_defconfig
-       [ -d \$d ] || mkdir \$d
+       [ -d \$d ] || mkdir \$d || exit 1
        log_ppc=\$d.log
-       cross -n -N -a powerpc64 -k powerpc -c $gcc_version O=\$d ppc64_defconfig
+       cross -n -N -a powerpc64 -k powerpc -c $gcc_version O=\$d ppc64_defconfig || exit 1
        /usr/bin/time cross -n -N -a powerpc64 -k powerpc -c $gcc_version O=\$d -j$j_factor -s > \$log_ppc 2>&1 &
 
        echo Building: arm multi_v7_defconfig
        d=../arm_multi_v7_defconfig
-       [ -d \$d ] || mkdir \$d
+       [ -d \$d ] || mkdir \$d || exit 1
        log_arm=\$d.log
-       cross -n -N -a arm -c $gcc_version O=\$d multi_v7_defconfig
+       cross -n -N -a arm -c $gcc_version O=\$d multi_v7_defconfig || exit 1
        /usr/bin/time cross -n -N -a arm -c $gcc_version O=\$d -j$j_factor -s > \$log_arm 2>&1 &
 
        wait %3