summaryrefslogtreecommitdiffstats
path: root/scripts/run_tests
diff options
context:
space:
mode:
authorAbhishek Koneru <akoneru@redhat.com>2013-11-06 16:08:39 -0500
committerAbhishek Koneru <akoneru@redhat.com>2013-11-10 15:15:37 -0500
commitb9d125a25e7b53cfe1cc9437b6a31a87c324bbe2 (patch)
tree28434dbf47dbf2ac6711604ac3f8e4c0513dc327 /scripts/run_tests
parentbb20c9ffb38baae7ae89f16737e37569af445bdc (diff)
Provide compose scripts for tests.
Provide a compose script for building the test rpm and creating the job xml (by updating the job template with custom values provided in a job xml config file). Also add a new option --createrepo to the compose_pki_core_package script to create a repository of the built rpms at the location specified in a config file. Tickets #657, 722,723,724
Diffstat (limited to 'scripts/run_tests')
-rwxr-xr-xscripts/run_tests28
1 files changed, 28 insertions, 0 deletions
diff --git a/scripts/run_tests b/scripts/run_tests
new file mode 100755
index 000000000..8e4d65e9f
--- /dev/null
+++ b/scripts/run_tests
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+WAIT_FOR_RESULT='N'
+if [ $# -ge 1 ] ; then
+ if [ "$1" = "--wait-on-beaker-job" ] ; then
+ WAIT_FOR_RESULT="Y"
+ else
+ echo "Unrecognized option. Usage: ./runtests --wait-on-beaker-job(Optional)"
+ fi
+fi
+COMPOSE_PWD=`dirname $0 | cd; pwd`
+
+TEST_PACKAGE=`cd $COMPOSE_PWD/../../package.tests; pwd`
+
+if [ ! -d $TEST_PACKAGE ] ; then
+ echo "Cannot run tests on beaker. Please compose the test rpms."
+ exit -1
+fi
+
+cd $TEST_PACKAGE
+
+bkr task-add *.rpm
+
+if [ "$WAIT_FOR_RESULT" = "Y" ] ; then
+ bkr job-submit --wait *.xml
+else
+ bkr job-submit *.xml
+fi