diff options
author | Abhishek Koneru <akoneru@redhat.com> | 2013-11-20 02:24:38 -0500 |
---|---|---|
committer | Abhishek Koneru <akoneru@redhat.com> | 2013-11-20 16:15:56 -0500 |
commit | 9c2f7724c2a50246ad73796edfda0917a2aaefe3 (patch) | |
tree | 7d5637b2e8fccd9863c9323a6753f828f586bf90 /scripts/compose_pki_test_package | |
parent | 24727d1b096cd30f7474ca9c03fa9c1be04be0cd (diff) | |
download | pki-9c2f7724c2a50246ad73796edfda0917a2aaefe3.tar.gz pki-9c2f7724c2a50246ad73796edfda0917a2aaefe3.tar.xz pki-9c2f7724c2a50246ad73796edfda0917a2aaefe3.zip |
Maintain seperate scripts for task and jobxml creation.
The compose script for creating the test rpm and submitting the job
is broken into two scripts, one for creating the test rpm
and one for creating the job xml.
CI Test Framework
Diffstat (limited to 'scripts/compose_pki_test_package')
-rwxr-xr-x | scripts/compose_pki_test_package | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/scripts/compose_pki_test_package b/scripts/compose_pki_test_package index 879c48a92..517a54040 100755 --- a/scripts/compose_pki_test_package +++ b/scripts/compose_pki_test_package @@ -23,17 +23,17 @@ check_for_dependencies() check_for_dependencies -if [ $# -lt 2 ]; +if [ $# -lt 1 ]; then - echo "Usage: $0 User-ID_for_personalization Job_xml_config_file [--runtests]" + echo "Usage: $0 unique_identifier [--submit-tests]" exit -1 fi RUN_TESTS='N' -if [ $# -gt 2 ]; +if [ $# -gt 1 ]; then - if [ $3 = "--runtests" ] + if [ $2 = "--submit-tests" ] then RUN_TESTS='Y' fi @@ -53,12 +53,14 @@ WORK_DIR=`cd $COMPOSE_DIR/../..;pwd` BUILD_DIR="$WORK_DIR/package.tests" -rm -rf $BUILD_DIR - -mkdir $BUILD_DIR +if [ ! -d $BUILD_DIR ] ; then + mkdir $BUILD_DIR +fi cd $BUILD_DIR +rm -rf *.rpm + cp -r "$PKI_SOURCE_DIR/tests" . ### Compile the java test source ### @@ -79,16 +81,13 @@ cd .. ### Passing the keyword for personalizing and an option ### to maintain a seperate folder for each beaker job (Optional) -./make-package.sh $1 $2 +./make-package.sh $1 mv *.rpm ../../ -mv *.xml ../../ - +cd ../.. ### Running the tasks -cd $COMPOSE_DIR - if [ $RUN_TESTS = "Y" ] ; then - ./run_tests + bkr task-add *.rpm fi |