[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit
Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/app/busybox/src/scripts/randomtest.loop b/ap/app/busybox/src/scripts/randomtest.loop
new file mode 100755
index 0000000..758a8e8
--- /dev/null
+++ b/ap/app/busybox/src/scripts/randomtest.loop
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+run_testsuite=true
+
+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++
+ 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++
+done