From 5ce90087ac47e8600caa4ab3d9c6773c171b875e Mon Sep 17 00:00:00 2001 From: Justin M. Forbes Date: Jan 20 2013 17:00:51 +0000 Subject: Infrastructure clean up --- diff --git a/default/defaultpass/runtest.sh b/default/defaultpass/runtest.sh deleted file mode 100755 index b44a7a7..0000000 --- a/default/defaultpass/runtest.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -echo "sample test from the default directory, should always pass" - -exit 0 diff --git a/default/defaultpass/runtest.sh.example b/default/defaultpass/runtest.sh.example new file mode 100755 index 0000000..b44a7a7 --- /dev/null +++ b/default/defaultpass/runtest.sh.example @@ -0,0 +1,5 @@ +#!/bin/bash + +echo "sample test from the default directory, should always pass" + +exit 0 diff --git a/minimal/minimalfail/runtest.sh b/minimal/minimalfail/runtest.sh deleted file mode 100755 index 45312b3..0000000 --- a/minimal/minimalfail/runtest.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -echo "sample test from the minimal directory, should always pass" - -exit 32 diff --git a/minimal/minimalfail/runtest.sh.example b/minimal/minimalfail/runtest.sh.example new file mode 100755 index 0000000..1efb53e --- /dev/null +++ b/minimal/minimalfail/runtest.sh.example @@ -0,0 +1,5 @@ +#!/bin/bash + +echo "sample test from the minimal directory, should always fail" + +exit 32 diff --git a/minimal/minimalpass/runtest.sh b/minimal/minimalpass/runtest.sh deleted file mode 100755 index 20905d4..0000000 --- a/minimal/minimalpass/runtest.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -echo "sample test from the minimal directory, should always pass" - -exit 0 diff --git a/minimal/minimalpass/runtest.sh.example b/minimal/minimalpass/runtest.sh.example new file mode 100755 index 0000000..20905d4 --- /dev/null +++ b/minimal/minimalpass/runtest.sh.example @@ -0,0 +1,5 @@ +#!/bin/bash + +echo "sample test from the minimal directory, should always pass" + +exit 0 diff --git a/minimal/minimalskip/runtest.sh b/minimal/minimalskip/runtest.sh deleted file mode 100755 index bc139dc..0000000 --- a/minimal/minimalskip/runtest.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -echo "sample test from the minimal directory, should always skip" - -exit 3 diff --git a/minimal/minimalskip/runtest.sh.example b/minimal/minimalskip/runtest.sh.example new file mode 100755 index 0000000..bc139dc --- /dev/null +++ b/minimal/minimalskip/runtest.sh.example @@ -0,0 +1,5 @@ +#!/bin/bash + +echo "sample test from the minimal directory, should always skip" + +exit 3 diff --git a/runtests.sh b/runtests.sh index 924df4f..299ab92 100755 --- a/runtests.sh +++ b/runtests.sh @@ -5,6 +5,7 @@ topdir=$(pwd) logfile=$topdir/logs/kernel-test-$date.log verbose=n testset=default +cleanrun=PASS kver=$(uname -r) release=$(cat /etc/redhat-release) @@ -112,7 +113,18 @@ do result=FAIL esac printf "%-65s%-8s\n" "$testname" "$result" + if [ "$result" == "FAIL" ]; then + cleanrun=FAIL + fi fi popd &>/dev/null done done + +if [ "$cleanrun" == "FAIL" ]; then + printf "\n%-65s%-8s\n" "Test suite complete" "$cleanrun" + exit 1 +else + printf "\n%-65s%-8s\n" "Test suite complete" "$cleanrun" + exit 0 +fi