Merge branch 'speedup_jenkins' into develop

This commit is contained in:
odain
2019-12-03 11:09:30 +01:00
5 changed files with 36 additions and 3 deletions

View File

@@ -2,6 +2,8 @@
set -x
whoami
pwd
ls

View File

@@ -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
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

6
Jenkinsfile vendored
View File

@@ -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}'
}
}
}

View File

@@ -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);
}

View File

@@ -53,6 +53,9 @@
<testsuite name="Application">
<directory>application</directory>
</testsuite>
<testsuite name="OQL">
<directory>OQL</directory>
</testsuite>
<testsuite name="Status">
<directory>status</directory>
</testsuite>