aboutsummaryrefslogtreecommitdiff
path: root/test/run_test.sh
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-17 00:27:43 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-17 00:27:43 +0000
commit103e5770f120d70b1580bfc3cab8219c6608bc21 (patch)
tree55d04f6fbf26db1698fb12264ac3b86c40455187 /test/run_test.sh
downloadpaludis-103e5770f120d70b1580bfc3cab8219c6608bc21.tar.gz
paludis-103e5770f120d70b1580bfc3cab8219c6608bc21.tar.xz
Initial import
Diffstat (limited to 'test/run_test.sh')
-rwxr-xr-xtest/run_test.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/run_test.sh b/test/run_test.sh
new file mode 100755
index 000000000..0fa50f27f
--- /dev/null
+++ b/test/run_test.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+# vim: set ft=sh sw=4 sts=4 et :
+
+if test -f "$1"_"setup.sh" ; then
+ echo ">>> setup for test $1"
+ if ! "$1"_"setup.sh" ; then
+ echo ">>> exiting with error for test $1"
+ exit 255
+ fi
+fi
+
+echo ">>> test $1"
+if ! $1 ; then
+ if test -f "$1"_"cleanup.sh" ; then
+ echo ">>> cleanup for test $1"
+ "$1"_"cleanup.sh"
+ fi
+ echo ">>> exiting with error for test $1"
+ exit 255
+fi
+
+if test -f "$1"_"cleanup.sh" ; then
+ echo ">>> cleanup for test $1"
+ if ! "$1"_"cleanup.sh" ; then
+ echo ">>> exiting with error for test $1"
+ exit 255
+ fi
+fi
+
+echo ">>> exiting with success for test $1"
+exit 0
+