aboutsummaryrefslogtreecommitdiff
path: root/scripts/randomtest.loop
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-05-10 04:16:43 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-05-10 04:16:43 +0200
commitff0e875e02487b61dcc520b295feb6477b859065 (patch)
tree234845d306bf04446b9839c51b06d18d5f9dc9a6 /scripts/randomtest.loop
parent572b9a3019caf0929a41a45e1f3a8c7e59ec141c (diff)
downloadbusybox-ff0e875e02487b61dcc520b295feb6477b859065.tar.gz
work on adding testsuite runs to randomconfig test builds
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'scripts/randomtest.loop')
-rwxr-xr-xscripts/randomtest.loop36
1 files changed, 32 insertions, 4 deletions
diff --git a/scripts/randomtest.loop b/scripts/randomtest.loop
index 28edb6732..311536df8 100755
--- a/scripts/randomtest.loop
+++ b/scripts/randomtest.loop
@@ -1,10 +1,38 @@
#!/bin/sh
+test -d "$1" || { echo "'$1' is not a directory"; exit 1; }
+test -x "$1/scripts/randomtest" || { echo "No scripts/randomtest in '$1'"; exit 1; }
+
+export LIBC="uclibc"
+export CROSS_COMPILER_PREFIX="i486-linux-uclibc-"
+export MAKEOPTS="-j9"
+
cnt=0
fail=0
-
while sleep 1; do
- echo "Passes: $cnt Failures: $fail"
- ./randomtest >/dev/null || exit #let fail++
- let cnt++
+ echo "Passes: $cnt Failures: $fail"
+ dir="test.$$"
+ while test -e "$dir" -o -e "failed.$dir"; do
+ dir="test.$$.$RANDOM"
+ done
+ echo "Running randconfig test in $dir..."
+ if ! "$1/scripts/randomtest" "$1" "$dir" >/dev/null; then
+ mv -- "$dir" "failed.$dir"
+ echo "Failed build in: failed.$dir"
+ exit 1 # you may comment this out...
+ let fail++
+ else
+ (
+ cd -- "$dir/testsuite" || exit 1
+ echo "Running testsuite in $dir..."
+ SKIP_KNOWN_BUGS=1 SKIP_INTERNET_TESTS=1 ./runtest -v >runtest.log 2>&1
+ )
+ if test $? != 0; then
+ echo "Failed runtest in $dir"
+ exit 1
+ fi
+ tail -n10 -- "$dir/testsuite/runtest.log"
+ rm -rf -- "$dir"
+ fi
+ let cnt++
done