From ed81391afff72d5d5c4fc6a4eaa3c8c3e62f89a6 Mon Sep 17 00:00:00 2001 From: odain Date: Tue, 3 Dec 2019 09:59:37 +0100 Subject: [PATCH] !y# This is a combination of 4 commits. run OQL tests depending on jenkins param try sth try sth try sth try sth try sth fix parameter to run OQL tests or not run OQL tests depending on jenkins param try sth try sth try sth try sth try sth fix parameter to run OQL tests or not --- .jenkins/bin/init/debug.sh | 2 ++ .jenkins/bin/tests/phpunit.sh | 14 ++++++++------ Jenkinsfile | 6 +++--- test/phpunit.xml.dist | 3 +++ 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.jenkins/bin/init/debug.sh b/.jenkins/bin/init/debug.sh index 8f9ea404a..583a0aed6 100755 --- a/.jenkins/bin/init/debug.sh +++ b/.jenkins/bin/init/debug.sh @@ -2,6 +2,8 @@ set -x + + whoami pwd ls diff --git a/.jenkins/bin/tests/phpunit.sh b/.jenkins/bin/tests/phpunit.sh index ce3543f4b..1067772c4 100755 --- a/.jenkins/bin/tests/phpunit.sh +++ b/.jenkins/bin/tests/phpunit.sh @@ -6,14 +6,16 @@ cd test export DEBUG_UNIT_TEST=0 RUN_NONREG_TESTS=0 -if [ $# -ge 1 ] +if [ $# -ge 1 -a "x$1" == "xtrue" ] then - export DEBUG_UNIT_TEST=$1 + export DEBUG_UNIT_TEST=1 +else + export DEBUG_UNIT_TEST=0 fi -if [ $# -ge 2 ] +if [ $# -ge 2 -a "x$2" == "xtrue" ] then - RUN_NONREG_TESTS=$2 + echo php vendor/bin/phpunit --log-junit ../var/test/phpunit-log.junit.xml --teamcity +else + echo php vendor/bin/phpunit --log-junit ../var/test/phpunit-log.junit.xml --exclude-group OQL --teamcity fi - -#php vendor/bin/phpunit --log-junit ../var/test/phpunit-log.junit.xml --teamcity \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index e736d5aab..0e04b54dd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,8 +1,8 @@ pipeline { agent any parameters { - string(name: 'DEBUG_UNIT_TEST', defaultValue: '0', description: 'Debug mode?') - string(name: 'RUN_NON_REG_TESTS', defaultValue: '0', description: 'Do You want to run legacy OQL regression tests?') + booleanParam(name: 'debugMode', defaultValue: 'false', description: 'Debug mode?') + booleanParam(name: 'runNonRegOQLTests', defaultValue: 'false', description: 'Do You want to run legacy OQL regression tests?') } stages { @@ -40,7 +40,7 @@ pipeline { parallel { stage('phpunit') { steps { - sh './.jenkins/bin/tests/phpunit.sh ${params.DEBUG_UNIT_TEST} ${params.RUN_NON_REG_TESTS}' + sh './.jenkins/bin/tests/phpunit.sh ${debugMode} ${runNonRegOQLTests}' } } } diff --git a/test/phpunit.xml.dist b/test/phpunit.xml.dist index 3f00fb36f..c5d9335c0 100644 --- a/test/phpunit.xml.dist +++ b/test/phpunit.xml.dist @@ -53,6 +53,9 @@ application + + OQL + status