diff options
author | Zheng Jiajia <jiajia.zheng@intel.com> | 2009-09-17 12:53:22 +0200 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2009-09-17 12:53:22 +0200 |
commit | 40ef8bac5cf244fe62921cdaa918ab6831090db0 (patch) | |
tree | 6cb7dee456d29cf5957a104eb29d962a455ac0ca | |
parent | 1b48835497ead329a30dd573681ab2029a075fa9 (diff) | |
download | mce-test-40ef8bac5cf244fe62921cdaa918ab6831090db0.tar.gz |
loop-mce-test: Add a test tool for running the mca test cases in a loop.
Based on work from Dean Nelson
Signed-off-by: Zheng Jiajia <jiajia.zheng@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
-rw-r--r-- | tools/loop-mce-test | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tools/loop-mce-test b/tools/loop-mce-test new file mode 100644 index 0000000..d7434f1 --- /dev/null +++ b/tools/loop-mce-test @@ -0,0 +1,36 @@ +#!/bin/bash +# +# Run mce test cases in a loop. It exits on failure of any one of the test cases. +# This script is using simple test driver. +# +# Authors: Dean Nelson <dnelson@redhat.com> +# iZheng Jiajia <jiajia.zheng@intel.com> +# This file is released under the GPLv2. +# +# Usage: +#Run as root and invoke this test tool on test configure file. +#For example, ./loop-mce-test simple_ser.conf +#Note that only simple test configure file is used and full path is not needed here. + +sd=$(dirname "$0") +export ROOT=`(cd $sd/..; pwd)` + +. $ROOT/lib/functions.sh + +[ $# -eq 1 ] || die "missing parameter for loop-mce-test: ./loop-mce-test <config_file>" + +i=0 +while [ 1 ] ; do + ((i=i+1)) + echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!! loop $i" + rm $ROOT/results/simple/result + + sh $ROOT/drivers/simple/driver.sh $ROOT/config/$1 + + sed -e'/gcov/d' $ROOT/results/simple/result | grep "Fail" > /dev/null + if [ $? = 0 ] ; then + echo "failed on loop $i" + exit 0 + fi +done + |