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 3c327f6c9..1067772c4 100755 --- a/.jenkins/bin/tests/phpunit.sh +++ b/.jenkins/bin/tests/phpunit.sh @@ -3,6 +3,19 @@ set -x cd test -export DEBUG_UNIT_TEST="0" +export DEBUG_UNIT_TEST=0 +RUN_NONREG_TESTS=0 -php vendor/bin/phpunit --log-junit ../var/test/phpunit-log.junit.xml --teamcity \ No newline at end of file +if [ $# -ge 1 -a "x$1" == "xtrue" ] +then + export DEBUG_UNIT_TEST=1 +else + export DEBUG_UNIT_TEST=0 +fi + +if [ $# -ge 2 -a "x$2" == "xtrue" ] +then + 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 diff --git a/Jenkinsfile b/Jenkinsfile index 94ac751e6..0e04b54dd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,9 @@ pipeline { agent any + parameters { + booleanParam(name: 'debugMode', defaultValue: 'false', description: 'Debug mode?') + booleanParam(name: 'runNonRegOQLTests', defaultValue: 'false', description: 'Do You want to run legacy OQL regression tests?') + } stages { stage('init') { @@ -36,7 +40,7 @@ pipeline { parallel { stage('phpunit') { steps { - sh './.jenkins/bin/tests/phpunit.sh' + sh './.jenkins/bin/tests/phpunit.sh ${debugMode} ${runNonRegOQLTests}' } } } diff --git a/test/core/HTMLDOMSanitizerTest.php b/test/core/HTMLDOMSanitizerTest.php index 3b8f6eecc..93bd0939f 100644 --- a/test/core/HTMLDOMSanitizerTest.php +++ b/test/core/HTMLDOMSanitizerTest.php @@ -24,6 +24,7 @@ class HTMLDOMSanitizerTest extends ItopTestCase { $sInputHtml = $this->ReadTestFile($sFileToTest, self::INPUT_DIRECTORY); $sOutputHtml = $this->ReadTestFile($sFileToTest, self::OUTPUT_DIRECTORY); +<<<<<<< HEAD $oSanitizer = new HTMLDOMSanitizer(); $sRes = $oSanitizer->DoSanitize($sInputHtml); @@ -35,6 +36,12 @@ class HTMLDOMSanitizerTest extends ItopTestCase // So we're removing new lines on both sides :/ $sOutputHtml = $this->RemoveNewLines($sOutputHtml); $sRes = $this->RemoveNewLines($sRes); +======= + $sOutputHtml = $this->RemoveNewLines($sOutputHtml); + + $oSanitizer = new HTMLDOMSanitizer(); + $sRes = $oSanitizer->DoSanitize($sInputHtml); +>>>>>>> speedup_jenkins $this->debug($sRes); $this->assertEquals($sOutputHtml, $sRes); @@ -78,6 +85,7 @@ class HTMLDOMSanitizerTest extends ItopTestCase $oSanitizer = new HTMLDOMSanitizer(); $sRes = $oSanitizer->DoSanitize($sHtmlToTest); +<<<<<<< HEAD // Removing newlines as the parser gives different results depending on the PHP version // Didn't manage to get it right : // - no php.ini difference @@ -86,6 +94,9 @@ class HTMLDOMSanitizerTest extends ItopTestCase $sHtmlToTest = $this->RemoveNewLines($sHtmlToTest); $sRes = $this->RemoveNewLines($sRes); +======= + $this->debug($sRes); +>>>>>>> speedup_jenkins $this->assertEquals($sHtmlToTest, $sRes); } 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