X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Ftests%2Frun_fw_update_test_nand.sh;h=70747a1406697e7c4970699aca4df2fef7952f0d;hp=8893d40b02764463f92782def76f654282d1f269;hb=22f31a41cbb9a08e67204279fb3b37e400309f1c;hpb=1a60bf00885822831b6553b58ec5236d385f07a3 diff --git a/direct/tests/run_fw_update_test_nand.sh b/direct/tests/run_fw_update_test_nand.sh index 8893d40..70747a1 100755 --- a/direct/tests/run_fw_update_test_nand.sh +++ b/direct/tests/run_fw_update_test_nand.sh @@ -1,15 +1,42 @@ #!/bin/bash +iterations=100000 -for ((i=0; i < 100000; i++)) +[ -z $1 ] || iterations=$1 + + +rm iteration-max-* +touch iteration-max-$iterations + +echo " Running $iterations iterations" +sleep 2 + +for ((i=0; i < $iterations; i++)) do seed=$RANDOM j=$(( $i % 10 )) - rm seed-nand-*$j + + rm -f log-nand-*$j + rm -f seed-nand-*$j echo $seed>seed-nand-for-run-$i - rm emfile-2k-0-*$j + + rm -f emfile-2k-0-*$j + rm -f emfile-2k-1-*$j + rm -f emfile-2k-2-*$j + rm -f emfile-2k-3-*$j + cp emfile-2k-0 emfile-2k-0-$i - echo "######### Run $i with seed $seed" - ./yaffs_test -u -f -p -s$seed yaffs2 + cp emfile-2k-1 emfile-2k-1-$i + cp emfile-2k-2 emfile-2k-2-$i + cp emfile-2k-3 emfile-2k-3-$i + + echo "#########" + echo "#########" + echo "#########" + echo "######### Run $i of $iterations with seed $seed" + echo "#########" + echo "#########" + echo "#########" + ./yaffs_test -u -f -p -s$seed -t 0 yaffs2 >log-nand-$i done