annotate more/bisectinate.sh @ 1229:313c702a0984

Remove toybox.
author Rob Landley <rob@landley.net>
date Tue, 24 Aug 2010 03:08:47 -0500
parents cfcb4ee310b0
children e093423880fc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
957
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
1 #!/bin/bash
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
2
1214
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
3 # Development script: bisect a git repository to find the first broken commit
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
4 # since the last known good version.
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
5
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
6 # If any of the pipe segments fail, treat that as a fail.
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
7
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
8 set -o pipefail
957
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
9
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
10 if [ $# -ne 4 ]
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
11 then
1214
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
12 echo "usage: [LONG=1] bisectinate ARCH PACKAGE REPO[@BAD] GOOD" >&2
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
13 echo >&2
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
14 echo "Bisect PACKAGE for ARCH, from START to BAD within REPO" >&2
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
15 echo "If LONG is set, success means building dropbear natively." >&2
957
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
16 exit 1
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
17 fi
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
18
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
19 # Parse command line options
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
20
1214
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
21 ARCH="$1"
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
22 PKG="$2"
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
23 REPO="${3/@*/}"
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
24 BRANCH="${3/*@/}"
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
25 [ "$BRANCH" == "$3" ] && BRANCH=master
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
26 START="$4"
957
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
27
986
fb0152b485f4 Give bisectinate.sh overrideable SRCDIR and BUILD.
Rob Landley <rob@landley.net>
parents: 985
diff changeset
28 TOP="$(pwd)"
fb0152b485f4 Give bisectinate.sh overrideable SRCDIR and BUILD.
Rob Landley <rob@landley.net>
parents: 985
diff changeset
29 [ -z "$SRCDIR" ] && SRCDIR="$TOP/packages"
fb0152b485f4 Give bisectinate.sh overrideable SRCDIR and BUILD.
Rob Landley <rob@landley.net>
parents: 985
diff changeset
30 [ -z "$BUILD" ] && BUILD="$TOP/build"
957
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
31
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
32 if [ ! -d "$REPO/.git" ]
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
33 then
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
34 echo "No git repo at $REPO"
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
35 exit 1
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
36 fi
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
37
995
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
38 # For kernel and busybox bisects, only redo part of the build
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
39
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
40 if [ "$PKG" == linux ] && [ -e "$BUILD/root-filesystem-$ARCH".tar.bz2 ]
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
41 then
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
42 ZAPJUST=system-image
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
43 elif [ "$PKG" == busybox ] &&
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
44 [ -e "$BUILD/simple-cross-compiler-$ARCH.tar.bz2" ]
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
45 then
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
46 ZAPJUST=root-filesystem
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
47 else
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
48 ZAPJUST=
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
49 fi
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
50
1214
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
51 # If we need to build dropbear, make sure the control images exist.
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
52
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
53 [ ! -z "$LONG" ] && more/build-control-images.sh
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
54
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
55 # Initialize bisection repository
957
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
56
1214
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
57 rm -rf "$BUILD/packages/alt-$PKG" "$SRCDIR/alt-$PKG-0.tar.bz2" &&
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
58 mkdir -p "$BUILD"/{logs,packages} &&
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
59 cd "$BUILD/packages" &&
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
60 git clone "$REPO" "alt-$PKG" &&
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
61 cd "alt-$PKG" &&
957
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
62 git bisect start &&
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
63 git bisect good "$START" || exit 1
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
64
1214
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
65 RESULT="bad $BRANCH"
957
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
66
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
67 # Loop through bisection results
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
68
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
69 while true
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
70 do
1214
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
71 # Bisect repository to prepare next version to build. Exit if done.
957
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
72
1214
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
73 cd "$BUILD/packages/alt-$PKG" &&
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
74 git clean -fdx &&
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
75 git checkout -f || exit 1
957
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
76
1214
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
77 RESULT="$(git bisect $RESULT)"
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
78 echo "$RESULT"
957
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
79 [ ! "$(echo "$RESULT" | head -n 1 | grep "^Bisecting:")" ] && exit
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
80
1214
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
81 # Update log
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
82
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
83 git show > "$BUILD/logs/bisectinate-${ARCH}.txt"
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
84 git bisect log > "$BUILD/logs/bisectinate-${ARCH}.log"
986
fb0152b485f4 Give bisectinate.sh overrideable SRCDIR and BUILD.
Rob Landley <rob@landley.net>
parents: 985
diff changeset
85 # The "cat" bypasses git's stupid overengineered built-in call to less.
fb0152b485f4 Give bisectinate.sh overrideable SRCDIR and BUILD.
Rob Landley <rob@landley.net>
parents: 985
diff changeset
86 git log HEAD -1 | cat
fb0152b485f4 Give bisectinate.sh overrideable SRCDIR and BUILD.
Rob Landley <rob@landley.net>
parents: 985
diff changeset
87 echo "Testing..."
957
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
88
1214
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
89 cd "$TOP" || exit 1
957
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
90
1214
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
91 # Figure out how much ./build.sh needs to rebuild
995
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
92
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
93 [ ! -z "$ZAPJUST" ] &&
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
94 rm -rf "$BUILD/${ZAPJUST}-$ARCH"{,.tar.bz2} ||
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
95 rm -rf "$BUILD"/*-"$ARCH"{,.tar.bz2}
1214
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
96
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
97 # Try the build
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
98
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
99 EXTRACT_ALL=1 ALLOW_PATCH_FAILURE=1 USE_UNSTABLE="$PKG" \
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
100 ./build.sh "$ARCH" 2>&1 | tee -a "$BUILD"/logs/bisectinate-"$ARCH".txt
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
101
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
102 # Did it work?
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
103
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
104 RESULT=bad
994
4a02bb65fe0c Fix a typo that broke the script completely.
Rob Landley <rob@landley.net>
parents: 986
diff changeset
105 if [ -e "$BUILD"/system-image-"$ARCH".tar.bz2 ]
957
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
106 then
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
107 if [ -z "$LONG" ]
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
108 then
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
109 RESULT=good
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
110 else
1214
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
111
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
112 # With $LONG, success means natively building dropbear, so try that.
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
113
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
114 rm -rf "$BUILD"/system-image-"$ARCH"/upload/dropbearmulti
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
115 more/timeout.sh 60 more/native-build-from-build.sh "$ARCH" \
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
116 build/control-images/static-tools.hdc 2>&1 \
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
117 | tee -a "$BUILD"/logs/bisectinate-"$ARCH".txt
957
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
118
986
fb0152b485f4 Give bisectinate.sh overrideable SRCDIR and BUILD.
Rob Landley <rob@landley.net>
parents: 985
diff changeset
119 [ -e "$BUILD"/cron-temp/"$ARCH"-dropbearmulti ] && RESULT=good
957
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
120 fi
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
121 fi
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
122
1214
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
123 # Keep the last "good" and "bad" logs, separately.
957
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
124
1214
cfcb4ee310b0 Stab at updating bisectinate to use git clone into build/packages (instead of lots of redundant "git archive | tar x" passes, which pointlessly waste disk and cpu). Still issues around alt-patches and around LONG=1 tests (should be separate "expect" style and hdc control image style test levels).
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
125 mv "$BUILD"/logs/bisectinate{,-$RESULT}-"$ARCH".txt
957
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
126 done