changeset 995:c867d05d8c4d

Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily. Note that the busybox optimization is a bit subtle: if build.sh sees that root-filesystem-$ARCH.tar.bz2 doesn't exist, it'll delete system-image-$ARCH.tar.bz2 to signal the next stage needs to be rebuilt. So even if the root-filesystem build then dies, bisectinate.sh will still notice the build failed because the system-image tarball isn't there. (This wouldn't work for the cross-compiler tarball, the failure wouldn't propogate far enough on its own. In build.sh it only goes one stage forward at a time.)
author Rob Landley <rob@landley.net>
date Sun, 07 Mar 2010 13:18:58 -0600
parents 4a02bb65fe0c
children bd6cc5603989
files sources/more/bisectinate.sh
diffstat 1 files changed, 18 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sources/more/bisectinate.sh	Sun Mar 07 11:49:25 2010 -0600
+++ b/sources/more/bisectinate.sh	Sun Mar 07 13:18:58 2010 -0600
@@ -27,6 +27,19 @@
   exit 1
 fi
 
+# For kernel and busybox bisects, only redo part of the build
+
+if [ "$PKG" == linux ] && [ -e "$BUILD/root-filesystem-$ARCH".tar.bz2 ]
+then
+  ZAPJUST=system-image
+elif [ "$PKG" == busybox ] &&
+     [ -e "$BUILD/simple-cross-compiler-$ARCH.tar.bz2" ]
+then
+  ZAPJUST=root-filesystem
+else
+  ZAPJUST=
+fi
+
 # Start bisecting repository
 
 mkdir -p "$BUILD"/logs
@@ -62,7 +75,10 @@
   # Perform actual build
 
   RESULT=bad
-  rm -rf "$BUILD"/*-"$ARCH"{,.tar.bz2} "$BUILD"/cron-temp/"$ARCH"-dropbearmulti
+
+  [ ! -z "$ZAPJUST" ] &&
+    rm -rf "$BUILD/${ZAPJUST}-$ARCH"{,.tar.bz2} ||
+    rm -rf "$BUILD"/*-"$ARCH"{,.tar.bz2}
   EXTRACT_ALL=yes USE_UNSTABLE="$PKG" ./build.sh "$ARCH" \
     | tee -a "$BUILD"/logs/test-"$ARCH".txt
   if [ -e "$BUILD"/system-image-"$ARCH".tar.bz2 ]
@@ -71,6 +87,7 @@
     then
       RESULT=good
     else
+     rm -rf "$BUILD"/cron-temp/"$ARCH"-dropbearmulti
      sources/more/native-static-build.sh "$ARCH" 2>&1 \
        | tee -a "$BUILD"/logs/test-"$ARCH".txt