From d9aa353e746d9f7e777e7bfaa640df75aea940ac Mon Sep 17 00:00:00 2001 From: hellwig Date: Thu, 13 Sep 2012 13:00:17 +0000 Subject: [PATCH] script for regression-test git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1634 8c4709b5-6ec9-48aa-a5cd-a96041d1645a --- scripts/run-regression-test.sh | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 scripts/run-regression-test.sh diff --git a/scripts/run-regression-test.sh b/scripts/run-regression-test.sh new file mode 100755 index 00000000..556c65b8 --- /dev/null +++ b/scripts/run-regression-test.sh @@ -0,0 +1,49 @@ +#!/bin/bash +declare testsuccess=$true; +declare build_dir=$PWD/../build +declare target_dir=$PWD/../../experiment_targets/regression-test +declare script_dir=$PWD + +cd $build_dir; +if [ ! -d build ]; then +mkdir build; +cd build; +cmake ..; +fi +cp ../../experiment_targets/regression-test/CMakeCache.txt CMakeCache.txt -f +cd $target_dir; +cd $build_dir; +#$script_dir/rebuild-bochs.sh; +cd $target_dir; +$build_dir/bin/fail-client -q; + +#diff tracing plugin +diff -q regression-trace.results golden_run/regression-trace.results +if [ ! $? -eq 0 ] +then + testsuccess=$false; +fi + +#diff Main results + +diff -q regression-test.results golden_run/regression-test.results +if [ ! $? -eq 0 ] +then + echo -e '\033[37;44m Regression-Test FAILED. \033[0m' + if $testsuccess; + then + echo -e '\033[37;44m Tracing-Plugin Test SUCCESS. \033[0m' + else + echo -e '\033[37;44m Tracing-Plugin Test FAILED. \033[0m' + fi +else + if $testsuccess; + then + echo -e '\033[37;44m Regression-Test SUCCESS. \033[0m' + echo -e '\033[37;44m Tracing-Plugin Test SUCCESS. \033[0m' + else + echo -e '\033[37;44m Regression-Test FAILED. \033[0m' + echo -e '\033[37;44m Tracing-Plugin Test FAILED. \033[0m' + fi +fi +