forked from bcd/freewpc
-
Notifications
You must be signed in to change notification settings - Fork 1
/
stressbuild
executable file
·90 lines (82 loc) · 1.82 KB
/
stressbuild
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/bash
#
# stressbuild - test many different build configurations at once
#
typeset -i count
typeset -i mincount
machines="funhouse t2 tz wcs afm corvette tester"
native_options="n y"
gcc_options="4.3.4"
debugger_options="n y"
mincount=1
while [ "x$1" != "x" ]; do
option=$1; shift
case $option in
--native)
native_options="y"
;;
--6809)
native_options="n"
;;
--fast)
machines="funhouse t2 tz wcs afm"
native_options="n"
debugger_options="y"
gcc_options="4.3.4"
;;
--gcc)
gcc_options="$1"; shift
;;
*)
mincount=$option
;;
esac
done
count=0
rm -f stressbuild.log
for native in $native_options; do
if [ "$native" = "y" ]; then
NATIVE=y
else
unset NATIVE
fi
for mach in ${machines}; do
if [ "$native:$mach" = "y:tzsound" ]; then
continue
fi
for debugger in $debugger_options; do
if [ "$native" = "n" ]; then
gcctargets=${gcc_options}
else
gcctargets=`echo nop`;
fi
for gcc in $gcctargets; do
if [ "$gcc" = "nop" ]; then gcc=; fi
count=$(($count + 1))
if [ "$count" -lt "$mincount" ]; then continue; fi
for target in `echo clean default_target`; do
cfg="NATIVE=$NATIVE MACHINE=$mach FREEWPC_DEBUGGER=$debugger GCC_VERSION=$gcc target=$target"
echo "Begin: ($count) $cfg" | tee -a stressbuild.log
export MACHINE=$mach
export FREEWPC_DEBUGGER=$debugger
export GCC_VERSION=$gcc
export NATIVE
make -j3 DOTCONFIG="" $target 2>&1 > /dev/null
rc="$?"
if [ -f err ]; then
echo "Error file:" | tee -a stressbuild.log
cat err | tee -a stressbuild.log
fi
echo "End: ($count) $cfg" | tee -a stressbuild.log
echo "Exit code: ($count) $rc" | tee -a stressbuild.log
echo "" | tee -a stressbuild.log
if [ "$rc" != "0" ]; then
exit $rc
fi
done
done
done
done
done
echo "All done".
exit 0