+ 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++
+ continue
+ fi
+ if $run_testsuite; then
+ (
+ 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 # you may comment this out...
+ let fail++
+ continue
+ fi
+ tail -n10 -- "$dir/testsuite/runtest.log"
+ fi
+ rm -rf -- "$dir"
+ let cnt++