diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/randomtest.loop | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/randomtest.loop b/scripts/randomtest.loop index 2c8a9bd35..758a8e862 100755 --- a/scripts/randomtest.loop +++ b/scripts/randomtest.loop | |||
@@ -1,5 +1,7 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | run_testsuite=true | ||
4 | |||
3 | test -d "$1" || { echo "'$1' is not a directory"; exit 1; } | 5 | 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; } | 6 | test -x "$1/scripts/randomtest" || { echo "No scripts/randomtest in '$1'"; exit 1; } |
5 | 7 | ||
@@ -21,7 +23,9 @@ while sleep 1; do | |||
21 | echo "Failed build in: failed.$dir" | 23 | echo "Failed build in: failed.$dir" |
22 | exit 1 # you may comment this out... | 24 | exit 1 # you may comment this out... |
23 | let fail++ | 25 | let fail++ |
24 | else | 26 | continue |
27 | fi | ||
28 | if $run_testsuite; then | ||
25 | ( | 29 | ( |
26 | cd -- "$dir/testsuite" || exit 1 | 30 | cd -- "$dir/testsuite" || exit 1 |
27 | echo "Running testsuite in $dir..." | 31 | echo "Running testsuite in $dir..." |
@@ -29,10 +33,12 @@ while sleep 1; do | |||
29 | ) | 33 | ) |
30 | if test $? != 0; then | 34 | if test $? != 0; then |
31 | echo "Failed runtest in $dir" | 35 | echo "Failed runtest in $dir" |
32 | exit 1 | 36 | exit 1 # you may comment this out... |
37 | let fail++ | ||
38 | continue | ||
33 | fi | 39 | fi |
34 | tail -n10 -- "$dir/testsuite/runtest.log" | 40 | tail -n10 -- "$dir/testsuite/runtest.log" |
35 | rm -rf -- "$dir" | ||
36 | fi | 41 | fi |
42 | rm -rf -- "$dir" | ||
37 | let cnt++ | 43 | let cnt++ |
38 | done | 44 | done |