randomtest.loop 949 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/sh
  2. test -d "$1" || { echo "'$1' is not a directory"; exit 1; }
  3. test -x "$1/scripts/randomtest" || { echo "No scripts/randomtest in '$1'"; exit 1; }
  4. export LIBC="uclibc"
  5. export CROSS_COMPILER_PREFIX="i486-linux-uclibc-"
  6. export MAKEOPTS="-j9"
  7. cnt=0
  8. fail=0
  9. while sleep 1; do
  10. echo "Passes: $cnt Failures: $fail"
  11. dir="test.$$"
  12. while test -e "$dir" -o -e "failed.$dir"; do
  13. dir="test.$$.$RANDOM"
  14. done
  15. echo "Running randconfig test in $dir..."
  16. if ! "$1/scripts/randomtest" "$1" "$dir" >/dev/null; then
  17. mv -- "$dir" "failed.$dir"
  18. echo "Failed build in: failed.$dir"
  19. exit 1 # you may comment this out...
  20. let fail++
  21. else
  22. (
  23. cd -- "$dir/testsuite" || exit 1
  24. echo "Running testsuite in $dir..."
  25. SKIP_KNOWN_BUGS=1 SKIP_INTERNET_TESTS=1 ./runtest -v >runtest.log 2>&1
  26. )
  27. if test $? != 0; then
  28. echo "Failed runtest in $dir"
  29. exit 1
  30. fi
  31. tail -n10 -- "$dir/testsuite/runtest.log"
  32. rm -rf -- "$dir"
  33. fi
  34. let cnt++
  35. done