Denis Vlasenko | 27e1501 | 2008-09-28 17:19:02 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
Denys Vlasenko | ff0e875 | 2010-05-10 04:16:43 +0200 | [diff] [blame] | 3 | test -d "$1" || { echo "'$1' is not a directory"; exit 1; } |
| 4 | test -x "$1/scripts/randomtest" || { echo "No scripts/randomtest in '$1'"; exit 1; } |
| 5 | |
| 6 | export LIBC="uclibc" |
Denys Vlasenko | 26777aa | 2010-11-22 23:49:10 +0100 | [diff] [blame^] | 7 | export CROSS_COMPILER_PREFIX="i686-" |
Denys Vlasenko | ff0e875 | 2010-05-10 04:16:43 +0200 | [diff] [blame] | 8 | export MAKEOPTS="-j9" |
| 9 | |
Denis Vlasenko | 27e1501 | 2008-09-28 17:19:02 +0000 | [diff] [blame] | 10 | cnt=0 |
| 11 | fail=0 |
Denis Vlasenko | 27e1501 | 2008-09-28 17:19:02 +0000 | [diff] [blame] | 12 | while sleep 1; do |
Denys Vlasenko | ff0e875 | 2010-05-10 04:16:43 +0200 | [diff] [blame] | 13 | echo "Passes: $cnt Failures: $fail" |
| 14 | dir="test.$$" |
| 15 | while test -e "$dir" -o -e "failed.$dir"; do |
| 16 | dir="test.$$.$RANDOM" |
| 17 | done |
| 18 | echo "Running randconfig test in $dir..." |
| 19 | if ! "$1/scripts/randomtest" "$1" "$dir" >/dev/null; then |
| 20 | mv -- "$dir" "failed.$dir" |
| 21 | echo "Failed build in: failed.$dir" |
| 22 | exit 1 # you may comment this out... |
| 23 | let fail++ |
| 24 | else |
| 25 | ( |
| 26 | cd -- "$dir/testsuite" || exit 1 |
| 27 | echo "Running testsuite in $dir..." |
| 28 | SKIP_KNOWN_BUGS=1 SKIP_INTERNET_TESTS=1 ./runtest -v >runtest.log 2>&1 |
| 29 | ) |
| 30 | if test $? != 0; then |
| 31 | echo "Failed runtest in $dir" |
| 32 | exit 1 |
| 33 | fi |
| 34 | tail -n10 -- "$dir/testsuite/runtest.log" |
| 35 | rm -rf -- "$dir" |
| 36 | fi |
| 37 | let cnt++ |
Denis Vlasenko | 27e1501 | 2008-09-28 17:19:02 +0000 | [diff] [blame] | 38 | done |