Addition of Suite Variable 22/67122/1
authorTomas Markovic <tomas.markovic@pantheon.tech>
Fri, 12 Jan 2018 16:28:19 +0000 (17:28 +0100)
committerTomas Markovic <tomas.markovic@pantheon.tech>
Fri, 12 Jan 2018 16:41:06 +0000 (17:41 +0100)
Adding SUITE variable from netvirt scripts into others.

Change-Id: I985ef095592b579c5b6cc4c25bd10347acf14cab
Signed-off-by: Tomas Markovic <tomas.markovic@pantheon.tech>
jjb/integration/integration-deploy-controller-run-test.sh
jjb/integration/integration-start-cluster-run-test.sh
jjb/integration/integration-templates.yaml

index b8bbd135b298d3c27adebd89aecf95c0826bfeb7..3cfeb7e3962d153c1f4f0b2d8f369cc6dd45f2eb 100644 (file)
@@ -302,7 +302,23 @@ fi
 echo "Changing the testplan path..."
 cat "${testplan_filepath}" | sed "s:integration:${WORKSPACE}:" > testplan.txt
 cat testplan.txt
-SUITES=$( egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' testplan.txt | tr '\012' ' ' )
+
+# Use the testplan if specific SUITES are not defined.
+if [ -z "${SUITES}" ]; then
+    SUITES=`egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' testplan.txt | tr '\012' ' '`
+else
+    newsuites=""
+    workpath="${WORKSPACE}/test/csit/suites"
+    for suite in ${SUITES}; do
+        fullsuite="${workpath}/${suite}"
+        if [ -z "${newsuites}" ]; then
+            newsuites+=${fullsuite}
+        else
+            newsuites+=" "${fullsuite}
+        fi
+    done
+    SUITES=${newsuites}
+fi
 
 echo "Starting Robot test suites ${SUITES} ..."
 pybot -N ${TESTPLAN} --removekeywords wuks -c critical -e exclude -e skip_if_${DISTROSTREAM} -v BUNDLEFOLDER:${BUNDLEFOLDER} -v WORKSPACE:/tmp \
index 9b756e14aa1a8da43119f703dda21595fac61cfe..4ce0682170e8090514dd09e8a31506b231b22180 100644 (file)
@@ -112,7 +112,22 @@ echo "Changing the testplan path..."
 cat "${testplan_filepath}" | sed "s:integration:${WORKSPACE}:" > testplan.txt
 cat testplan.txt
 
-SUITES=`egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' testplan.txt | tr '\012' ' '`
+# Use the testplan if specific SUITES are not defined.
+if [ -z "${SUITES}" ]; then
+    SUITES=`egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' testplan.txt | tr '\012' ' '`
+else
+    newsuites=""
+    workpath="${WORKSPACE}/test/csit/suites"
+    for suite in ${SUITES}; do
+        fullsuite="${workpath}/${suite}"
+        if [ -z "${newsuites}" ]; then
+            newsuites+=${fullsuite}
+        else
+            newsuites+=" "${fullsuite}
+        fi
+    done
+    SUITES=${newsuites}
+fi
 
 echo "Starting Robot test suites ${SUITES} ..."
 pybot -N ${TESTPLAN} --removekeywords wuks -c critical -e exclude -e skip_if_${DISTROSTREAM} -v BUNDLEFOLDER:${BUNDLEFOLDER} \
index 851648d12ac951da4ada9e430b52d499dc75421a..a17507327ca66bbdbf6e62d83516bc031805bef8 100644 (file)
           stream-test-plan: '{project}-{functionality}-{stream}.txt'
       - integration-test-plan:
           test-plan: '{project}-{functionality}.txt'
+      - integration-test-suites:
+          test-suites: '{test-suites}'
       - integration-patch-refspec:
           branch: 'master'
       - integration-jdk-version:
           stream-test-plan: '{project}-{functionality}-{stream}.txt'
       - integration-test-plan:
           test-plan: '{project}-{functionality}.txt'
+      - integration-test-suites:
+          test-suites: '{test-suites}'
       - integration-patch-refspec:
           branch: 'master'
       - integration-jdk-version:
           stream-test-plan: '{project}-{functionality}-{verify-stream}.txt'
       - integration-test-plan:
           test-plan: '{project}-{functionality}.txt'
+      - integration-test-suites:
+          test-suites: '{test-suites}'
       - integration-jdk-version:
           jdkversion: '{verify-jdkversion}'
       - distribution-karaf-version:
           stream-test-plan: '{project}-{functionality}-{stream}.txt'
       - integration-test-plan:
           test-plan: '{project}-{functionality}.txt'
+      - integration-test-suites:
+          test-suites: '{test-suites}'
       - integration-patch-refspec:
           branch: 'master'
       - integration-jdk-version:
           stream-test-plan: '{project}-{functionality}-{stream}.txt'
       - integration-test-plan:
           test-plan: '{project}-{functionality}.txt'
+      - integration-test-suites:
+          test-suites: '{test-suites}'
       - integration-patch-refspec:
           branch: 'master'
       - integration-jdk-version: