From: Corey Farrell Date: Mon, 23 Jul 2018 15:23:22 +0000 (-0400) Subject: CI: Split --test-command argument. X-Git-Tag: 16.0.0-rc1~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5dbbc68311447b1f2c600143fd08cc1bb76c7294;p=thirdparty%2Fasterisk.git CI: Split --test-command argument. The --test-command argument has now been split, unit tests now use `--unittest-command` and the testsuite uses --testsuite-command. This will make it easier to create a script which run everything by forwarding the same arguments to all CI scripts. Change-Id: Ia54aa4848eaffbdf13175fcda40fc0b23080ad71 --- diff --git a/tests/CI/gates.jenkinsfile b/tests/CI/gates.jenkinsfile index 9dc7308bec..206e7f3ced 100644 --- a/tests/CI/gates.jenkinsfile +++ b/tests/CI/gates.jenkinsfile @@ -167,7 +167,7 @@ pipeline { userRemoteConfigs: [[name: env.GERRIT_NAME, url: testsuiteUrl]] ] - sh "sudo tests/CI/runTestsuite.sh --testsuite-dir='${groupDir}' --test-command='${groupTestcmd}'" + sh "sudo tests/CI/runTestsuite.sh --testsuite-dir='${groupDir}' --testsuite-command='${groupTestcmd}'" archiveArtifacts allowEmptyArchive: true, defaultExcludes: false, fingerprint: true, artifacts: "${groupDir}/asterisk-test-suite-report.xml, ${groupDir}/logs/**, ${groupDir}/core*.txt" diff --git a/tests/CI/periodics-daily.jenkinsfile b/tests/CI/periodics-daily.jenkinsfile index 335edd9975..a79c2d5170 100644 --- a/tests/CI/periodics-daily.jenkinsfile +++ b/tests/CI/periodics-daily.jenkinsfile @@ -114,7 +114,7 @@ pipeline { userRemoteConfigs: [[url: testsuiteUrl]] ] - sh "sudo tests/CI/runTestsuite.sh ${groupRunTestsuiteOptions} --testsuite-dir='${groupDir}' --test-command='${groupTestcmd}'" + sh "sudo tests/CI/runTestsuite.sh ${groupRunTestsuiteOptions} --testsuite-dir='${groupDir}' --testsuite-command='${groupTestcmd}'" archiveArtifacts allowEmptyArchive: true, defaultExcludes: false, fingerprint: true, artifacts: "${groupDir}/asterisk-test-suite-report.xml, ${groupDir}/logs/**, ${groupDir}/core*.txt" diff --git a/tests/CI/ref_debug.jenkinsfile b/tests/CI/ref_debug.jenkinsfile index d0c42eab4d..40bdd67ab3 100644 --- a/tests/CI/ref_debug.jenkinsfile +++ b/tests/CI/ref_debug.jenkinsfile @@ -92,7 +92,7 @@ pipeline { userRemoteConfigs: [[url: testsuiteUrl]] ] - sh "sudo tests/CI/runTestsuite.sh --testsuite-dir='${groupDir}' --test-command='${groupTestcmd}'" + sh "sudo tests/CI/runTestsuite.sh --testsuite-dir='${groupDir}' --testsuite-command='${groupTestcmd}'" archiveArtifacts allowEmptyArchive: true, defaultExcludes: false, fingerprint: true, artifacts: "${groupDir}/asterisk-test-suite-report.xml, ${groupDir}/logs/**, ${groupDir}/core*.txt" diff --git a/tests/CI/runTestsuite.sh b/tests/CI/runTestsuite.sh index 4ca63691f2..a8908d4f0f 100755 --- a/tests/CI/runTestsuite.sh +++ b/tests/CI/runTestsuite.sh @@ -13,8 +13,8 @@ if [ $REALTIME -eq 1 ] ; then fi export PYTHONPATH=./lib/python/ -echo "Running tests ${TEST_COMMAND}" -./runtests.py --cleanup ${TEST_COMMAND} | contrib/scripts/pretty_print --no-color --no-timer --term-width=120 --show-errors || : +echo "Running tests ${TESTSUITE_COMMAND}" +./runtests.py --cleanup ${TESTSUITE_COMMAND} | contrib/scripts/pretty_print --no-color --no-timer --term-width=120 --show-errors || : if [ $REALTIME -eq 1 ] ; then $CIDIR/teardownRealtime.sh @@ -26,4 +26,4 @@ if [ -f core* ] ; then exit 1 fi -popd \ No newline at end of file +popd diff --git a/tests/CI/runUnittests.sh b/tests/CI/runUnittests.sh index c334ea64b2..1d2656b176 100755 --- a/tests/CI/runUnittests.sh +++ b/tests/CI/runUnittests.sh @@ -60,7 +60,7 @@ for n in `seq 1 5` ; do $ASTERISK -rx "core waitfullybooted" -C $CONFFILE && break done sleep 1 -$ASTERISK -rx "${TEST_COMMAND:-test execute all}" -C $CONFFILE +$ASTERISK -rx "${UNITTEST_COMMAND:-test execute all}" -C $CONFFILE $ASTERISK -rx "test show results failed" -C $CONFFILE $ASTERISK -rx "test generate results xml $OUTPUTFILE" -C $CONFFILE $ASTERISK -rx "core stop now" -C $CONFFILE diff --git a/tests/CI/unittests.jenkinsfile b/tests/CI/unittests.jenkinsfile index 767ff9447c..c1c01c1cb9 100644 --- a/tests/CI/unittests.jenkinsfile +++ b/tests/CI/unittests.jenkinsfile @@ -136,7 +136,7 @@ pipeline { sh 'sudo ./tests/CI/installAsterisk.sh --user-group=jenkins:users' - sh "tests/CI/runUnittests.sh --user-group=jenkins:users --output-dir='${outputdir}' --output-xml='${outputfile}' --test-command='${testcmd}'" + sh "tests/CI/runUnittests.sh --user-group=jenkins:users --output-dir='${outputdir}' --output-xml='${outputfile}' --unittest-command='${testcmd}'" archiveArtifacts allowEmptyArchive: true, defaultExcludes: false, fingerprint: true, artifacts: "${outputdir}/**"