Mercurial > hg > aboriginal
annotate more/smoketest-all.sh @ 1409:8d0567d46cd7
Create smoketest-report.sh producing CSV with more info.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 05 Jul 2011 08:39:59 -0500 |
parents | ce5212c0fc05 |
children | a4823c561e28 |
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 |
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
|
9 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
|
10 { |
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 [ -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
|
12 [ ! -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
|
13 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
|
14 [ -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
|
15 [ -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
|
16 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
|
17 } |
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
|
18 |
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
|
19 # 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
|
20 # 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
|
21 |
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
|
22 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
|
23 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
|
24 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
|
25 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
|
26 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
|
27 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
|
28 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
|
29 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
|
30 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
|
31 |
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 wait |