Dash:
[t2.git] / misc / archive / regtest.sh
blob623dbb7fae1931a380abd51d2ac6014b885b4390
1 #!/bin/bash
3 # Tiny regression testsuite driver used by some core developers to track
4 # breakage, sometimes even automated on a nightly basis.
5 # - Rene Rebe
7 set -e
9 embedded=0
11 while [ "$1" ]; do
12 case $1 in
13 -embedded)
14 embedded=1
16 *) echo "Unknown option $1"
17 exit
19 esac
20 shift
21 done
23 mkdir -p regtest
25 build()
27 if [ ! -e regtest/$x.finished ]; then
29 mkdir -p config/regtest-$x
30 cat > config/regtest-$x/config <<-EOT
31 SDECFG_ARCH=$x
32 SDECFG_CROSSBUILD=1
33 SDECFG_PKG_CCACHE_USEIT=1
34 SDECFG_ABORT_ON_ERROR_AFTER=0
35 SDECFG_ALWAYS_CLEAN=1
36 SDECFG_XTRACE=1
37 SDECFG_EXPERT=1
38 SDECFG_OPT="lazy" # slightly speed up the test builds
39 EOT
40 if [ $embedded -eq 1 ]; then
41 cat >> config/regtest-$x/config <<-EOT
42 SDECFG_TARGET='embedded'
43 SDECFG_TARGET_EMBEDDED_STYLE='dietlibc'
44 SDECFG_PKGSEL='1'
45 EOT
47 cat > config/regtest-$x/pkgsel <<-EOT
48 O linux2*
49 EOT
52 ./scripts/Config -cfg regtest-$x -oldconfig
53 ./scripts/Download -cfg regtest-$x -required >> regtest/$x.log 2>&1
54 echo "Running build ..."
55 ./scripts/Build-Target -cfg regtest-$x 2>&1 | tee regtest/$x.log |
56 grep '> Building\|> Finished'
57 # id=`grep SDECFG_ID config/regtest-$x/config`
58 # eval $id
60 touch regtest/$x.finished
64 ./scripts/Create-ErrList -cfg regtest-$x | grep " builds "
67 for x in architecture/*/ ; do
68 [[ $x = *share* ]] && continue
69 x=${x#*/}; x=${x%/*}
71 if [ $embedded -eq 1 ]; then
72 case $x in
73 cris|hppa*|m68k|mips64|sh*) # no diet support
74 echo "Skipping $x (for now)"
75 continue
77 esac
80 echo "Processing $x ..."
81 build $x
82 done