annotate more/bisectinate.sh @ 1376:a6d18adf198d

Added tag 1.0.2 for changeset a9685aea2a2c
author Rob Landley <rob@landley.net>
date Tue, 14 Jun 2011 20:48:07 -0500
parents 1ce33f5b5fec
children aabc07905de3
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
1261
e093423880fc Replace bisectinate's built-in tests with a test specified on the command line.
Rob Landley <rob@landley.net>
parents: 1214
diff changeset
10 if [ $# -lt 4 ]
957
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
11 then
1261
e093423880fc Replace bisectinate's built-in tests with a test specified on the command line.
Rob Landley <rob@landley.net>
parents: 1214
diff changeset
12 echo "usage: [LONG=1] bisectinate ARCH PACKAGE REPO[@BAD] GOOD [TEST...]" >&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
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"
1261
e093423880fc Replace bisectinate's built-in tests with a test specified on the command line.
Rob Landley <rob@landley.net>
parents: 1214
diff changeset
27 shift 4
e093423880fc Replace bisectinate's built-in tests with a test specified on the command line.
Rob Landley <rob@landley.net>
parents: 1214
diff changeset
28 TEST="$1"
957
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
29
986
fb0152b485f4 Give bisectinate.sh overrideable SRCDIR and BUILD.
Rob Landley <rob@landley.net>
parents: 985
diff changeset
30 TOP="$(pwd)"
fb0152b485f4 Give bisectinate.sh overrideable SRCDIR and BUILD.
Rob Landley <rob@landley.net>
parents: 985
diff changeset
31 [ -z "$SRCDIR" ] && SRCDIR="$TOP/packages"
fb0152b485f4 Give bisectinate.sh overrideable SRCDIR and BUILD.
Rob Landley <rob@landley.net>
parents: 985
diff changeset
32 [ -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
33
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
34 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
35 then
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
36 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
37 exit 1
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
38 fi
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
39
1261
e093423880fc Replace bisectinate's built-in tests with a test specified on the command line.
Rob Landley <rob@landley.net>
parents: 1214
diff changeset
40 if [ -z "$TEST" ]
e093423880fc Replace bisectinate's built-in tests with a test specified on the command line.
Rob Landley <rob@landley.net>
parents: 1214
diff changeset
41 then
e093423880fc Replace bisectinate's built-in tests with a test specified on the command line.
Rob Landley <rob@landley.net>
parents: 1214
diff changeset
42 if [ -z "$LONG" ]
e093423880fc Replace bisectinate's built-in tests with a test specified on the command line.
Rob Landley <rob@landley.net>
parents: 1214
diff changeset
43 then
e093423880fc Replace bisectinate's built-in tests with a test specified on the command line.
Rob Landley <rob@landley.net>
parents: 1214
diff changeset
44 TEST=true
e093423880fc Replace bisectinate's built-in tests with a test specified on the command line.
Rob Landley <rob@landley.net>
parents: 1214
diff changeset
45 else
e093423880fc Replace bisectinate's built-in tests with a test specified on the command line.
Rob Landley <rob@landley.net>
parents: 1214
diff changeset
46 # With $LONG, success means natively building dropbear.
e093423880fc Replace bisectinate's built-in tests with a test specified on the command line.
Rob Landley <rob@landley.net>
parents: 1214
diff changeset
47 TEST='rm -rf "$BUILD"/system-image-"$ARCH"/upload/dropbearmulti &&
e093423880fc Replace bisectinate's built-in tests with a test specified on the command line.
Rob Landley <rob@landley.net>
parents: 1214
diff changeset
48 more/native-build-from-build.sh "$ARCH" \
e093423880fc Replace bisectinate's built-in tests with a test specified on the command line.
Rob Landley <rob@landley.net>
parents: 1214
diff changeset
49 build/control-images/static-tools.hdc
e093423880fc Replace bisectinate's built-in tests with a test specified on the command line.
Rob Landley <rob@landley.net>
parents: 1214
diff changeset
50 test -e "$BUILD"/system-image-"$ARCH"/upload/dropbearmulti'
e093423880fc Replace bisectinate's built-in tests with a test specified on the command line.
Rob Landley <rob@landley.net>
parents: 1214
diff changeset
51 fi
e093423880fc Replace bisectinate's built-in tests with a test specified on the command line.
Rob Landley <rob@landley.net>
parents: 1214
diff changeset
52 fi
e093423880fc Replace bisectinate's built-in tests with a test specified on the command line.
Rob Landley <rob@landley.net>
parents: 1214
diff changeset
53
995
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
54 # 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
55
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
56 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
57 then
1361
1ce33f5b5fec Make bisectinate actually use the LONG=1 test.
Rob Landley <rob@landley.net>
parents: 1261
diff changeset
58 ZAPJUST=linux-kernel
995
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
59 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
60 [ -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
61 then
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
62 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
63 else
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
64 ZAPJUST=
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
65 fi
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
66
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
67 # 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
68
1361
1ce33f5b5fec Make bisectinate actually use the LONG=1 test.
Rob Landley <rob@landley.net>
parents: 1261
diff changeset
69 [ ! -z "$LONG" ] && [ ! -e build/control-images/static-tools.hdc ] &&
1ce33f5b5fec Make bisectinate actually use the LONG=1 test.
Rob Landley <rob@landley.net>
parents: 1261
diff changeset
70 more/build-control-images.sh
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
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
72 # 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
73
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
74 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
75 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
76 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
77 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
78 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
79 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
80 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
81
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
82 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
83
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
84 # 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
85
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
86 while true
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
87 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
88 # 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
89
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
90 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
91 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
92 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
93
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
94 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
95 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
96 [ ! "$(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
97
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
98 # 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
99
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 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
101 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
102 # 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
103 git log HEAD -1 | cat
fb0152b485f4 Give bisectinate.sh overrideable SRCDIR and BUILD.
Rob Landley <rob@landley.net>
parents: 985
diff changeset
104 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
105
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
106 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
107
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
108 # 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
109
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
110 [ ! -z "$ZAPJUST" ] &&
c867d05d8c4d Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents: 994
diff changeset
111 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
112 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
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 # 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
115
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 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
117 ./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
118
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
119 # 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
120
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
121 RESULT=bad
994
4a02bb65fe0c Fix a typo that broke the script completely.
Rob Landley <rob@landley.net>
parents: 986
diff changeset
122 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
123 then
1261
e093423880fc Replace bisectinate's built-in tests with a test specified on the command line.
Rob Landley <rob@landley.net>
parents: 1214
diff changeset
124 set -o pipefail
1361
1ce33f5b5fec Make bisectinate actually use the LONG=1 test.
Rob Landley <rob@landley.net>
parents: 1261
diff changeset
125 ARCH="$ARCH" more/timeout.sh 60 "$TEST" 2>&1 | \
1ce33f5b5fec Make bisectinate actually use the LONG=1 test.
Rob Landley <rob@landley.net>
parents: 1261
diff changeset
126 tee -a "$BUILD/logs/bisectinate-$ARCH".txt
1261
e093423880fc Replace bisectinate's built-in tests with a test specified on the command line.
Rob Landley <rob@landley.net>
parents: 1214
diff changeset
127 [ $? -eq 0 ] && 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
128 fi
44483a915e13 Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff changeset
129
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
130 # 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
131
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
132 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
133 done