blob: 7c6863718f5c2128fff7e08b5b2cead08676201c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
#!/bin/sh
set -e
# Usage: runtests.sh [/path/to/qemu-system-arm] [toolchain-prefix]
die() {
echo "$1" >&2
exit 1
}
QEMU=qemu-system-arm
MAKEARGS=
if [ $# != 0 ]; then
QEMU="$1"
shift
fi
if [ $# != 0 ]; then
MAKEARGS="PREFIX=$1"
shift
fi
if [ $# != 0 ]; then
die "Usage: runtests.sh [/path/to/qemu-system-arm] [toolchain-prefix]"
fi
ARGS="-no-reboot -M lm3s6965evb -m 16 -serial stdio -display none -net nic -net user,restrict=on -d guest_errors,unimp"
$QEMU --version
RET=0
dotest() {
echo "=============== Testing $1 ==============="
TEST="-kernel $1"
if perl tapit.pl "timeout 30 $QEMU $ARGS $TEST" </dev/null 2>&1
then
true
else
RET=1
if [ "$TRACEERR" ]; then
echo "Test error, re-run with -d exec"
timeout 30 $QEMU $ARGS $TEST </dev/null > test.log 2>&1 || true
head -n50 test.log
echo "==============="
tail -n50 test.log
fi
fi
}
make $MAKEARGS
dotest test1-kern.bin
dotest test9-kern.bin
dotest test10-kern.bin
dotest test4-kern.bin
dotest test5-kern.bin
dotest test13-kern.bin
dotest test3-kern.bin
dotest test12-kern.bin
dotest test7-kern.bin
dotest test14-kern.bin
dotest test8-kern.bin
dotest test11-kern.bin
dotest test15-kern.bin
exit $RET
|