-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompile-all-commits.sh
More file actions
executable file
·50 lines (35 loc) · 996 Bytes
/
compile-all-commits.sh
File metadata and controls
executable file
·50 lines (35 loc) · 996 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
BRANCH=$1
if [ -z "$BRANCH" ]
then
BRANCH=`git rev-parse --abbrev-ref HEAD`
fi
git checkout --quiet $BRANCH
SINCE=$2
if [ -z "$SINCE" ]
then
SINCE=`git describe --abbrev=0 --tags`
fi
UNTIL=$3
if [ -z "$UNTIL" ]
then
UNTIL="HEAD"
fi
ALL_COMMITS=`git log $SINCE..$UNTIL --oneline | awk '{ print $1 }'`
NUM_ALL=$(echo $ALL_COMMITS | wc -w)
echo "Testing all $NUM_ALL commits from $SINCE until $UNTIL on branch '${BRANCH}', in reverse order."
cp -v .config config-all-compile-backup
echo -n "" > ok.txt
echo -n "" > failed.txt
COUNT=0
for x in $ALL_COMMITS
do
COUNT=$((COUNT + 1))
git checkout --quiet $x > /dev/null
echo -n "[${COUNT}/${NUM_ALL}] "
git log -n1 --oneline --quiet HEAD
make olddefconfig > /tmp/make-msg.txt 2>&1
make -j 64 bzImage >> /tmp/make-msg.txt 2>&1 && echo $x >> ok.txt && echo "$x ok" || (echo $x >> failed.txt; mv /tmp/make-msg.txt diag-$x.log; echo "$x FAILED")
done
git checkout $BRANCH
cp -v config-all-compile-backup .config