annotate smoketest-all.sh @ 772:7cb6ef2cdf10

Busybox unstable currently needs this patch too.
author Rob Landley <rob@landley.net>
date Wed, 01 Jul 2009 18:02:44 -0500
parents 75835debe6b5
children e373d2b6d0b8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
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
3 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
4 then
75835debe6b5 Add --logs option to smoketest-all.sh to read existing logs from buildall.sh.
Rob Landley <rob@landley.net>
parents: 740
diff changeset
5 for i in build/smoketest-*.txt
75835debe6b5 Add --logs option to smoketest-all.sh to read existing logs from buildall.sh.
Rob Landley <rob@landley.net>
parents: 740
diff changeset
6 do
75835debe6b5 Add --logs option to smoketest-all.sh to read existing logs from buildall.sh.
Rob Landley <rob@landley.net>
parents: 740
diff changeset
7 NAME="$(echo $i | sed 's/smoketest-\(.*\)\.txt/\1/')"
75835debe6b5 Add --logs option to smoketest-all.sh to read existing logs from buildall.sh.
Rob Landley <rob@landley.net>
parents: 740
diff changeset
8 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
9 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
10 [ -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
11 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
12
75835debe6b5 Add --logs option to smoketest-all.sh to read existing logs from buildall.sh.
Rob Landley <rob@landley.net>
parents: 740
diff changeset
13 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
14 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
15
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
16 # Test all targets to see whether or not they can compile and run "hello world"
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
17
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 ls -pd build/system-image-* | sed -n 's@.*/system-image-\(.*\)/@\1@p' | while read i
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
19 do
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
20 echo -n "Testing $i:"
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
21 RESULT="$(./smoketest.sh "$i" 2>&1 | grep 'Hello world!')"
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
22 [ -z "$RESULT" ] && echo "FAIL" || echo "PASS"
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 rm -f build/system-image-"$i"/hdb.img 2>/dev/null
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
24 done