Mercurial > yaffs-ecoscentric-gpl
annotate direct/tests/run_fw_update_test_nand.sh @ 430:5a26e5bec29d
yaffs: Tweak tests to use log files
This runs faster than spewing onto a terminal.
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
| author | Charles Manning <cdhmanning@gmail.com> |
|---|---|
| date | Mon, 17 May 2010 11:02:42 +1200 |
| parents | fb9e777fdea2 |
| children |
| rev | line source |
|---|---|
|
246
e2403692acdc
Replace test scrips with nand and nor versions
charles <charles>
parents:
diff
changeset
|
1 #!/bin/bash |
|
e2403692acdc
Replace test scrips with nand and nor versions
charles <charles>
parents:
diff
changeset
|
2 |
| 312 | 3 iterations=100000 |
|
246
e2403692acdc
Replace test scrips with nand and nor versions
charles <charles>
parents:
diff
changeset
|
4 |
| 312 | 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++)) | |
|
246
e2403692acdc
Replace test scrips with nand and nor versions
charles <charles>
parents:
diff
changeset
|
15 do |
|
e2403692acdc
Replace test scrips with nand and nor versions
charles <charles>
parents:
diff
changeset
|
16 |
|
e2403692acdc
Replace test scrips with nand and nor versions
charles <charles>
parents:
diff
changeset
|
17 seed=$RANDOM |
|
e2403692acdc
Replace test scrips with nand and nor versions
charles <charles>
parents:
diff
changeset
|
18 j=$(( $i % 10 )) |
|
430
5a26e5bec29d
yaffs: Tweak tests to use log files
Charles Manning <cdhmanning@gmail.com>
parents:
376
diff
changeset
|
19 |
|
5a26e5bec29d
yaffs: Tweak tests to use log files
Charles Manning <cdhmanning@gmail.com>
parents:
376
diff
changeset
|
20 rm -f log-nand-*$j |
| 376 | 21 rm -f seed-nand-*$j |
|
301
5563bf238683
Change tests so they can run in parallel in same directory
charles <charles>
parents:
251
diff
changeset
|
22 echo $seed>seed-nand-for-run-$i |
| 376 | 23 |
| 24 rm -f emfile-2k-0-*$j | |
| 25 rm -f emfile-2k-1-*$j | |
| 26 rm -f emfile-2k-2-*$j | |
| 27 rm -f emfile-2k-3-*$j | |
| 28 | |
|
246
e2403692acdc
Replace test scrips with nand and nor versions
charles <charles>
parents:
diff
changeset
|
29 cp emfile-2k-0 emfile-2k-0-$i |
| 376 | 30 cp emfile-2k-1 emfile-2k-1-$i |
| 31 cp emfile-2k-2 emfile-2k-2-$i | |
| 32 cp emfile-2k-3 emfile-2k-3-$i | |
| 33 | |
| 312 | 34 echo "#########" |
| 35 echo "#########" | |
| 36 echo "#########" | |
| 37 echo "######### Run $i of $iterations with seed $seed" | |
| 38 echo "#########" | |
| 39 echo "#########" | |
| 40 echo "#########" | |
|
430
5a26e5bec29d
yaffs: Tweak tests to use log files
Charles Manning <cdhmanning@gmail.com>
parents:
376
diff
changeset
|
41 ./yaffs_test -u -f -p -s$seed -t 0 yaffs2 >log-nand-$i |
|
246
e2403692acdc
Replace test scrips with nand and nor versions
charles <charles>
parents:
diff
changeset
|
42 done |
