Mercurial > hg > aboriginal
annotate more/smoketest-all.sh @ 1314:ce5212c0fc05
Fix the includes.
author | Rob Landley <rob@landley.net> |
---|---|
date | Fri, 03 Dec 2010 20:18:50 -0600 |
parents | 300e6d919d86 |
children | 8d0567d46cd7 |
rev | line source |
---|---|
740
5b063eb13fd0
Quick and dirty script to run smoketest.sh on all targets, to see if they can compile and run "hello world".
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
1 #!/bin/bash |
5b063eb13fd0
Quick and dirty script to run smoketest.sh on all targets, to see if they can compile and run "hello world".
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
2 |
860 | 3 # Run smoketest script on every build/system-image-* architecture. |
4 | |
5 # If $FORK is set, run them in parallel. | |
6 | |
1314 | 7 . sources/utility_functions.sh || exit 1 |
778
e373d2b6d0b8
Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents:
758
diff
changeset
|
8 |
758
75835debe6b5
Add --logs option to smoketest-all.sh to read existing logs from buildall.sh.
Rob Landley <rob@landley.net>
parents:
740
diff
changeset
|
9 if [ "$1" == "--logs" ] |
75835debe6b5
Add --logs option to smoketest-all.sh to read existing logs from buildall.sh.
Rob Landley <rob@landley.net>
parents:
740
diff
changeset
|
10 then |
778
e373d2b6d0b8
Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents:
758
diff
changeset
|
11 for i in build/logs/smoketest-*.txt |
758
75835debe6b5
Add --logs option to smoketest-all.sh to read existing logs from buildall.sh.
Rob Landley <rob@landley.net>
parents:
740
diff
changeset
|
12 do |
778
e373d2b6d0b8
Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents:
758
diff
changeset
|
13 NAME="$(echo $i | sed 's/.*smoketest-\(.*\)\.txt/\1/')" |
758
75835debe6b5
Add --logs option to smoketest-all.sh to read existing logs from buildall.sh.
Rob Landley <rob@landley.net>
parents:
740
diff
changeset
|
14 echo -n "Testing $NAME:" |
75835debe6b5
Add --logs option to smoketest-all.sh to read existing logs from buildall.sh.
Rob Landley <rob@landley.net>
parents:
740
diff
changeset
|
15 RESULT="$(grep 'Hello world!' "$i")" |
75835debe6b5
Add --logs option to smoketest-all.sh to read existing logs from buildall.sh.
Rob Landley <rob@landley.net>
parents:
740
diff
changeset
|
16 [ -z "$RESULT" ] && echo "FAIL" || echo "PASS" |
75835debe6b5
Add --logs option to smoketest-all.sh to read existing logs from buildall.sh.
Rob Landley <rob@landley.net>
parents:
740
diff
changeset
|
17 done |
75835debe6b5
Add --logs option to smoketest-all.sh to read existing logs from buildall.sh.
Rob Landley <rob@landley.net>
parents:
740
diff
changeset
|
18 |
75835debe6b5
Add --logs option to smoketest-all.sh to read existing logs from buildall.sh.
Rob Landley <rob@landley.net>
parents:
740
diff
changeset
|
19 exit |
75835debe6b5
Add --logs option to smoketest-all.sh to read existing logs from buildall.sh.
Rob Landley <rob@landley.net>
parents:
740
diff
changeset
|
20 fi |
75835debe6b5
Add --logs option to smoketest-all.sh to read existing logs from buildall.sh.
Rob Landley <rob@landley.net>
parents:
740
diff
changeset
|
21 |
778
e373d2b6d0b8
Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents:
758
diff
changeset
|
22 function dotest() |
e373d2b6d0b8
Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents:
758
diff
changeset
|
23 { |
e373d2b6d0b8
Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents:
758
diff
changeset
|
24 [ -z "$FORK" ] && echo -n "Testing $1:" |
e373d2b6d0b8
Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents:
758
diff
changeset
|
25 [ ! -z "$VERBOSE" ] && VERBOSITY="tee >(cat >&2) |" |
1157
300e6d919d86
Move "sources/more/" to just "more/", add a README explaining why those scripts are there, and adjust calls to them.
Rob Landley <rob@landley.net>
parents:
917
diff
changeset
|
26 RESULT="$(more/smoketest.sh "$1" 2>&1 | eval "$VERBOSITY grep 'Hello world!'")" |
778
e373d2b6d0b8
Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents:
758
diff
changeset
|
27 [ -z "$RESULT" ] && RESULT="FAIL" || RESULT="PASS" |
e373d2b6d0b8
Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents:
758
diff
changeset
|
28 [ -z "$FORK" ] && echo "$RESULT" || echo "Testing $1:$RESULT" |
e373d2b6d0b8
Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents:
758
diff
changeset
|
29 rm -f build/system-image-"$1"/hdb.img 2>/dev/null |
e373d2b6d0b8
Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents:
758
diff
changeset
|
30 } |
740
5b063eb13fd0
Quick and dirty script to run smoketest.sh on all targets, to see if they can compile and run "hello world".
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
31 |
778
e373d2b6d0b8
Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents:
758
diff
changeset
|
32 # Test all non-hw targets to see whether or not they can compile and run |
e373d2b6d0b8
Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents:
758
diff
changeset
|
33 # the included "hello world" program. |
e373d2b6d0b8
Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents:
758
diff
changeset
|
34 |
917
a181d81540ed
Make smoketest-all.sh list architectures that didn't successfully make a system image as status "NONE".
Rob Landley <rob@landley.net>
parents:
860
diff
changeset
|
35 for i in $(ls -d sources/targets/* | sed 's@.*/@@' | grep -v "^hw-") |
740
5b063eb13fd0
Quick and dirty script to run smoketest.sh on all targets, to see if they can compile and run "hello world".
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
36 do |
917
a181d81540ed
Make smoketest-all.sh list architectures that didn't successfully make a system image as status "NONE".
Rob Landley <rob@landley.net>
parents:
860
diff
changeset
|
37 if [ -e "build/system-image-$i" ] |
a181d81540ed
Make smoketest-all.sh list architectures that didn't successfully make a system image as status "NONE".
Rob Landley <rob@landley.net>
parents:
860
diff
changeset
|
38 then |
a181d81540ed
Make smoketest-all.sh list architectures that didn't successfully make a system image as status "NONE".
Rob Landley <rob@landley.net>
parents:
860
diff
changeset
|
39 maybe_fork "dotest $i" |
a181d81540ed
Make smoketest-all.sh list architectures that didn't successfully make a system image as status "NONE".
Rob Landley <rob@landley.net>
parents:
860
diff
changeset
|
40 else |
a181d81540ed
Make smoketest-all.sh list architectures that didn't successfully make a system image as status "NONE".
Rob Landley <rob@landley.net>
parents:
860
diff
changeset
|
41 echo "Testing $i:NONE" |
a181d81540ed
Make smoketest-all.sh list architectures that didn't successfully make a system image as status "NONE".
Rob Landley <rob@landley.net>
parents:
860
diff
changeset
|
42 fi |
740
5b063eb13fd0
Quick and dirty script to run smoketest.sh on all targets, to see if they can compile and run "hello world".
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
43 done |
778
e373d2b6d0b8
Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents:
758
diff
changeset
|
44 |
e373d2b6d0b8
Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents:
758
diff
changeset
|
45 wait |