Mercurial > hg > aboriginal
annotate more/bisectinate.sh @ 1261:e093423880fc
Replace bisectinate's built-in tests with a test specified on the command line.
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 07 Oct 2010 23:54:33 -0500 |
parents | cfcb4ee310b0 |
children | 1ce33f5b5fec |
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 |
c867d05d8c4d
Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents:
994
diff
changeset
|
58 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
|
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 |
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
|
69 [ ! -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
|
70 |
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 # 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
|
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 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
|
74 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
|
75 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
|
76 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
|
77 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
|
78 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
|
79 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
|
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 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
|
82 |
44483a915e13
Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
83 # 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
|
84 |
44483a915e13
Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
85 while true |
44483a915e13
Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
86 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
|
87 # 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
|
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 "$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
|
90 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
|
91 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
|
92 |
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
|
93 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
|
94 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
|
95 [ ! "$(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
|
96 |
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
|
97 # 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
|
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 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
|
100 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
|
101 # 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
|
102 git log HEAD -1 | cat |
fb0152b485f4
Give bisectinate.sh overrideable SRCDIR and BUILD.
Rob Landley <rob@landley.net>
parents:
985
diff
changeset
|
103 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
|
104 |
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
|
105 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
|
106 |
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
|
107 # 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
|
108 |
c867d05d8c4d
Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents:
994
diff
changeset
|
109 [ ! -z "$ZAPJUST" ] && |
c867d05d8c4d
Optimize the linux and busybox bisects to not rebuild earlier sections unnecessarily.
Rob Landley <rob@landley.net>
parents:
994
diff
changeset
|
110 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
|
111 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
|
112 |
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 # 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
|
114 |
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 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
|
116 ./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
|
117 |
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 # 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
|
119 |
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 RESULT=bad |
994
4a02bb65fe0c
Fix a typo that broke the script completely.
Rob Landley <rob@landley.net>
parents:
986
diff
changeset
|
121 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
|
122 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
|
123 set -o pipefail |
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 more/timeout.sh 60 "$@" 2>&1 | tee -a "$BUILD/logs/bisectinate-$ARCH".txt |
e093423880fc
Replace bisectinate's built-in tests with a test specified on the command line.
Rob Landley <rob@landley.net>
parents:
1214
diff
changeset
|
125 [ $? -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
|
126 fi |
44483a915e13
Script to track down breakage in a USE_UNSTABLE package via git bisect.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
127 |
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
|
128 # 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
|
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 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
|
131 done |