yaffs: Tweak test scripts
[yaffs2.git] / direct / tests / run_fw_update_test_nand.sh
1 #!/bin/bash
2
3 iterations=100000
4
5 [ -z $1 ]  || iterations=$1
6
7
8 rm iteration-max-*
9 touch iteration-max-$iterations
10
11 echo " Running $iterations iterations"
12 sleep 2
13
14 for ((i=0; i < $iterations; i++))  
15 do
16
17    seed=$RANDOM   
18    j=$(( $i % 10 ))
19    rm -f seed-nand-*$j
20    echo $seed>seed-nand-for-run-$i
21
22    rm -f emfile-2k-0-*$j
23    rm -f emfile-2k-1-*$j
24    rm -f emfile-2k-2-*$j
25    rm -f emfile-2k-3-*$j
26
27    cp emfile-2k-0 emfile-2k-0-$i
28    cp emfile-2k-1 emfile-2k-1-$i
29    cp emfile-2k-2 emfile-2k-2-$i
30    cp emfile-2k-3 emfile-2k-3-$i
31
32    echo "#########"
33    echo "#########"
34    echo "#########"
35    echo "######### Run $i of $iterations with seed $seed"
36    echo "#########"
37    echo "#########"
38    echo "#########"
39    ./yaffs_test -u -f -p -s$seed -t 0 yaffs2
40 done