From 9331208f5066fa3feb3369b7bba630fe81d5153d Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Fri, 12 Jun 2015 10:26:33 +1000 Subject: [PATCH] do_build: Make the parallel logic work, drop set -e 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 | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/do_build b/do_build index 1a86eb0..ba631f4 100755 --- 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 -- 2.39.2