aboutsummaryrefslogtreecommitdiff
path: root/testcases/kdump
diff options
context:
space:
mode:
authorsubrata_modak <subrata_modak>2007-05-25 08:50:36 +0000
committersubrata_modak <subrata_modak>2007-05-25 08:50:36 +0000
commitc934327aad8476e96c5ef0223ba0777b77795149 (patch)
tree8129b0638a785bee320e09e8d140dd4e6e209cc3 /testcases/kdump
parent51951321c72c6ef58e3c7cfa5034c4c2e8a16f35 (diff)
<muvarov@gmail.com> added summary file for printing results table, and, added reboot command to test script
Diffstat (limited to 'testcases/kdump')
-rw-r--r--testcases/kdump/setup2
-rwxr-xr-xtestcases/kdump/summary37
-rw-r--r--testcases/kdump/test6
3 files changed, 44 insertions, 1 deletions
diff --git a/testcases/kdump/setup b/testcases/kdump/setup
index e1eda90a9..dc20a8cc1 100644
--- a/testcases/kdump/setup
+++ b/testcases/kdump/setup
@@ -21,7 +21,7 @@ VMLINUX_DEBUG=""
LINUX_2_6_16=2616
# Determine architecture we're running on
-arch= `uname -m`
+arch=`uname -m`
if [ `echo $arch |grep -e "i[3-6]86"` ]
then
CRASHKERNEL=$X86_CRASHKERNEL
diff --git a/testcases/kdump/summary b/testcases/kdump/summary
new file mode 100755
index 000000000..843027f0b
--- /dev/null
+++ b/testcases/kdump/summary
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+. control
+
+TESTS=`cat ./testfile`
+total=0
+pass=0
+fail=0
+nottested=0
+
+echo " RESULTS:"
+
+for TEST in $TESTS; do
+ total=`expr $total + 1`
+
+ LOG=`cat $RESULTS_DIR/\`ls $RESULTS_DIR/ |grep $TEST\` 2>/dev/null`
+ if [ $? != 0 ]; then
+ echo "$TEST: NOT TESTED"
+ nottested=`expr $nottested + 1`
+ else
+ # We think that test pass if elfread prints word Magic
+ echo $LOG |grep "Magic" > /dev/null
+ if [ $? == 0 ]; then
+ echo "$TEST: PASS"
+ pass=`expr $pass + 1`
+ else
+ echo "$TEST: FAIL"
+ fail=`expr $fail + 1`
+ fi
+ fi
+done
+
+echo "------------------"
+echo "Total: $total"
+echo "Pass: $pass"
+echo "Fail: $fail"
+echo "NT: $nottested"
diff --git a/testcases/kdump/test b/testcases/kdump/test
index 731c254a3..427135f62 100644
--- a/testcases/kdump/test
+++ b/testcases/kdump/test
@@ -192,3 +192,9 @@ c/cmdline`"
esac
+# Some tests could not reboot target. They can hung up machine
+# or leave it working. But we need to do all tests. So
+# we are going to reboot if we are in wrong place.
+
+sleep 30
+reboot \ No newline at end of file