summaryrefslogtreecommitdiffstats
path: root/run-tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'run-tests.sh')
-rwxr-xr-xrun-tests.sh29
1 files changed, 28 insertions, 1 deletions
diff --git a/run-tests.sh b/run-tests.sh
index d3c9af2ac..128404ed5 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -1,3 +1,30 @@
#!/bin/bash
+# Copyright (c) 2013 Red Hat, Inc. <http://www.redhat.com>
+#
-prove -rf --timer $(dirname $0)/tests;
+function _init()
+{
+ regression_testsdir=$(dirname $0);
+
+ if [ ! -f ${regression_testsdir}/tests/include.rc ]; then
+ echo "Seems like GlusterFS quality tests are corrupted..aborting!!"
+ exit 1
+ fi
+}
+
+function main()
+{
+ if [ $# -lt 1 ]; then
+ echo "Running all the regression test cases"
+ prove -rf --timer ${regression_testsdir}/tests;
+ else
+ ## TODO
+ echo "Running single regression test.."
+ echo "WARNING: yet to be implemented.. exiting safely"
+ exit 0
+ #export DEBUG=1;
+ #echo "Automatically setting up DEBUG=1 for this test $1";
+ fi
+}
+
+_init "$@" && main "$@"