summaryrefslogtreecommitdiffstats
path: root/run-tests.sh.in
diff options
context:
space:
mode:
authorHarshavardhana <harsha@harshavardhana.net>2013-08-21 00:50:41 -0700
committerAnand Avati <avati@redhat.com>2013-09-19 09:28:44 -0700
commit5d94695e9ad42343e72918024c046f22fe4941a0 (patch)
tree2b4c915eaa7ad53bfc731c0779c8aeb9ebcba877 /run-tests.sh.in
parent66747c96e6446da3da1c75ee7641fd75d1ed768c (diff)
tests: Create a regression-tests package for distribution
As of today regression tests are an in-house breed, by making it a new package and distributing it ensures larger set of people use it and contribute to it. This can also be used by any consumer/user to build their own environment for glusterfs regression testing which is today limited only to 'upstream' 'glusterfs' releases and build.gluster.org Change-Id: I4f7e9fd1c49982dcf0d788ef6a83ffe895a956ac BUG: 764966 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/5674 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'run-tests.sh.in')
-rwxr-xr-xrun-tests.sh.in31
1 files changed, 31 insertions, 0 deletions
diff --git a/run-tests.sh.in b/run-tests.sh.in
new file mode 100755
index 00000000000..a75b68171ff
--- /dev/null
+++ b/run-tests.sh.in
@@ -0,0 +1,31 @@
+#!/bin/bash
+# Copyright (c) 2013 Red Hat, Inc. <http://www.redhat.com>
+#
+
+function _init()
+{
+ prefix="@prefix@";
+ exec_prefix="@exec_prefix@";
+ regression_testsdir="@datarootdir@/glusterfs";
+ 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 "$@"