ash: do not let EXIT trap to fire in `trap`
[oweals/busybox.git] / scripts / randomtest
index 0450f76f0ca31193f8c47d870f5f2bfd5e4b2e83..bd5ef4bfee86e94b2190b9571b21e6cb77d8e1e1 100755 (executable)
@@ -2,8 +2,12 @@
 
 # Select which libc to build against
 libc="glibc" # assumed native
-# static cross-compiled (i486-linux-uclibc-XXX)
+# static, cross-compilation
 libc="uclibc"
+# x86 32-bit:
+uclibc_cross="i486-linux-uclibc-"
+# My system has strange prefix for x86 64-bit uclibc:
+#uclibc_cross="x86_64-pc-linux-gnu-"
 
 test -d tree || exit 1
 
@@ -31,6 +35,10 @@ cat .config \
 | grep -v ^CONFIG_SELINUX= \
 | grep -v ^CONFIG_EFENCE= \
 | grep -v ^CONFIG_DMALLOC= \
+| grep -v ^CONFIG_ACPID= \
+| grep -v ^CONFIG_FLASH_ERASEALL= \
+| grep -v ^CONFIG_FLASH_LOCK= \
+| grep -v ^CONFIG_FLASH_UNLOCK= \
 | cat >.config.new
 mv .config.new .config
 }
@@ -49,7 +57,7 @@ cat .config \
 | grep -v CONFIG_CROSS_COMPILER_PREFIX \
 | cat >.config.new
 mv .config.new .config
-echo 'CONFIG_CROSS_COMPILER_PREFIX="i486-linux-uclibc-"' >>.config
+echo 'CONFIG_CROSS_COMPILER_PREFIX="'"$uclibc_cross"'"' >>.config
 echo 'CONFIG_STATIC=y' >>.config
 }
 
@@ -72,21 +80,10 @@ cat .config \
 mv .config.new .config
 }
 
-# CONFIG_NOMMU + CONFIG_HUSH + CONFIG_WERROR don't mix
-# (produces warning)
-grep -q ^CONFIG_NOMMU= .config && \
-grep -q ^CONFIG_HUSH= .config && \
-{
-cat .config \
-| grep -v ^CONFIG_WERROR= \
-| cat >.config.new
-mv .config.new .config
-}
-
 # Regenerate .config with default answers for yanked-off options
 { yes "" | make oldconfig >/dev/null; } || exit 1
 
-nice -n 10 make
+nice -n 10 make 2>&1 | tee -a make.log
 
 test -x busybox && {
     cd ..
@@ -95,5 +92,5 @@ test -x busybox && {
 }
 
 cd ..
-mv "$dir" failed."$dir"
+mv "$dir" "failed.$dir"
 exit 1