Files
applets
arch
archival
configs
console-tools
coreutils
debianutils
docs
e2fsprogs
editors
examples
findutils
include
init
libbb
libpwdgrp
loginutils
mailutils
miscutils
modutils
networking
printutils
procps
runit
scripts
basic
kconfig
Kbuild.include
Kbuild.src
Makefile.IMA
Makefile.build
Makefile.clean
Makefile.host
Makefile.lib
bb_release
bloat-o-meter
checkhelp.awk
checkstack.pl
cleanup_printf2puts
echo.c
find_bad_common_bufsiz
find_stray_common_vars
find_stray_empty_lines
fix_ws.sh
gcc-version.sh
gen_build_files.sh
memusage
mkconfigs
mkdiff_obj
mkdiff_obj_bloat
mkmakefile
objsizes
randomtest
randomtest.loop
sample_pmap
showasm
test_make_O
test_make_clean
trylink
selinux
shell
sysklogd
testsuite
util-linux
.gitignore
.indent.pro
AUTHORS
Config.in
INSTALL
LICENSE
Makefile
Makefile.custom
Makefile.flags
Makefile.help
README
TODO
TODO_unicode
busybox/scripts/randomtest.loop
2010-11-22 23:49:10 +01:00

39 lines
936 B
Bash
Executable File

#!/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="i686-"
export MAKEOPTS="-j9"
cnt=0
fail=0
while sleep 1; do
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