comparison sources/more/smoketest-all.sh @ 841:4952504f5c57

Add a "sources/more" directory, move buildall and smoketest-all into it. (Stuff that build.sh doesn't wrap.)
author Rob Landley <rob@landley.net>
date Sat, 10 Oct 2009 02:22:29 -0500
parents smoketest-all.sh@23bff7aa79eb
children 6b80bbc15ded
comparison
equal deleted inserted replaced
840:96b276eda7f1 841:4952504f5c57
1 #!/bin/bash
2
3 . sources/functions.sh || exit 1
4
5 if [ "$1" == "--logs" ]
6 then
7 for i in build/logs/smoketest-*.txt
8 do
9 NAME="$(echo $i | sed 's/.*smoketest-\(.*\)\.txt/\1/')"
10 echo -n "Testing $NAME:"
11 RESULT="$(grep 'Hello world!' "$i")"
12 [ -z "$RESULT" ] && echo "FAIL" || echo "PASS"
13 done
14
15 exit
16 fi
17
18 function dotest()
19 {
20 [ -z "$FORK" ] && echo -n "Testing $1:"
21 [ ! -z "$VERBOSE" ] && VERBOSITY="tee >(cat >&2) |"
22 RESULT="$(./smoketest.sh "$1" 2>&1 | eval "$VERBOSITY grep 'Hello world!'")"
23 [ -z "$RESULT" ] && RESULT="FAIL" || RESULT="PASS"
24 [ -z "$FORK" ] && echo "$RESULT" || echo "Testing $1:$RESULT"
25 rm -f build/system-image-"$1"/hdb.img 2>/dev/null
26 }
27
28 # Test all non-hw targets to see whether or not they can compile and run
29 # the included "hello world" program.
30
31 for i in $(ls -pd build/system-image-* | sed -n 's@.*/system-image-\(.*\)/@\1@p' | grep -v "^hw-")
32 do
33 maybe_fork "dotest $i"
34 done
35
36 wait