Add more test scripts
authorCharles Manning <cdhmanning@gmail.com>
Fri, 12 Oct 2012 03:12:00 +0000 (16:12 +1300)
committerCharles Manning <cdhmanning@gmail.com>
Fri, 12 Oct 2012 03:12:00 +0000 (16:12 +1300)
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
direct/test-framework/tests/init_fw_update_test_m18.sh [new file with mode: 0755]
direct/test-framework/tests/run_fw_update_test_m18.sh [new file with mode: 0755]

diff --git a/direct/test-framework/tests/init_fw_update_test_m18.sh b/direct/test-framework/tests/init_fw_update_test_m18.sh
new file mode 100755 (executable)
index 0000000..4957990
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+# Run this to initialise the file system for the test runs.
+rm seed-m18-*
+rm emfile-m18*
+./yaffs_test  -u -i M18-1
diff --git a/direct/test-framework/tests/run_fw_update_test_m18.sh b/direct/test-framework/tests/run_fw_update_test_m18.sh
new file mode 100755 (executable)
index 0000000..9271563
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+iterations=100000
+
+[ -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-m18-*$j
+   echo $seed>seed-m18-for-run-$i
+
+
+   rm emfile-m18-*$j
+   cp emfile-m18 emfile-m18-$i
+
+   rm log-m18-*$j
+
+   echo "#########"
+   echo "#########"
+   echo "#########"
+   echo "######### Run $i of $iterations with seed $seed"
+   echo "#########"
+   echo "#########"
+   echo "#########"
+   ./yaffs_test -u -f -p -s$seed -t0 M18-1
+   #>log-m18-$i
+done
+