summaryrefslogtreecommitdiffstats
path: root/recipes-test/ddt-runner/files/scripts/p4080ds/flash
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-test/ddt-runner/files/scripts/p4080ds/flash')
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p4080ds/flash20
1 files changed, 20 insertions, 0 deletions
diff --git a/recipes-test/ddt-runner/files/scripts/p4080ds/flash b/recipes-test/ddt-runner/files/scripts/p4080ds/flash
new file mode 100755
index 0000000..19f95aa
--- /dev/null
+++ b/recipes-test/ddt-runner/files/scripts/p4080ds/flash
@@ -0,0 +1,20 @@
1#!/bin/sh
2#
3# This script is used to test flash driver functionality. I removed the write
4# operations since all partition are in use in p4080ds and there might be
5# possibility of corrupting data even if we backup in test script.
6
7if part_num=`cat /proc/mtd | grep -c 'mtd'`; then
8 echo "PASS: show $part_num partitions"
9else
10 echo "FAIL: show $part_num partitions"
11fi
12
13for((part=0; part<$part_num-1; part++));
14do
15 if [ $(mtd_debug info /dev/mtd$part | grep -c 'mtd.type') ]; then
16 echo "PASS: show partition $part debug info"
17 else
18 echo "FAIL: show partition $part debug info"
19 fi
20done