Skip to content

Commit ea582ef

Browse files
authored
Fix test.py call from Jenkins (#227)
- Fixing wrong extraFlags - Fixing wrong JULIA_TESTTING_FLAG - Adding smaller test config for basemodelica.jl
1 parent 0e573be commit ea582ef

File tree

2 files changed

+31
-6
lines changed

2 files changed

+31
-6
lines changed

.CI/Jenkinsfile

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ pipeline {
236236
expression { params.basemodelica_jl_master }
237237
}
238238
steps {
239-
runRegressiontest('master', 'basemodelica_jl_master', '--basemodelica-mtk-import', 'origin/master', 'ripper1', 'LibraryTestingRipper1DB', false, '', false, false)
239+
runRegressiontest('master', 'basemodelica_jl_master', '', '', 'ripper1', 'LibraryTestingRipper1DB', false, '', false, false, 0, 'configs/basemodelica.json')
240240
}
241241
}
242242

@@ -585,9 +585,22 @@ done
585585
/**
586586
* Launches the test.py script with the given options.
587587
*
588-
* @param libs_config_file: The config file to be used for testing. This file specifies which libraries to test and what options to use for them.
589-
* @param jobs: The number of tests/jobs to launch in parallel.
590-
By default this is set to 0 which means launch as many tests as there are available physical cpus on the machine'.
588+
* @param branch: OpenModelica branch to test. Will checkout the branch and build omc from it.
589+
* @param name: Unique name of the library test. Passed to test.py via flag `--branch`.
590+
* Also used for stashing omc and uploading results to https://test.openmodelica.org.
591+
* @param extraFlags: Additional compiler flags passed to test.py via flag `--extraflags`.
592+
* @param omsHash: OMSimulator SHA.
593+
* @param dbPrefix: Prefix for test results data base `sqlite3.db`.
594+
* @parm sshConfig: SSH configuration saved on test node.
595+
* @param omcompiler: Checkout old OMCompiler submodule. Should be `false` nowadays.
596+
* @param extrasimflags: Additional simulation flags passed to test.py via flag `--extrasimflags`.
597+
* @param removePackageOrder: Passed to `installLibraries`.
598+
* @param conversionScript: Passed to `installLibraries`.
599+
* @param jobs: The number of tests/jobs to launch in parallel.
600+
* By default this is set to `0` which means launch as many tests as there are available
601+
* physical cpus on the machine'.
602+
* @param libs_config_file: The config file to be used for testing.
603+
* This file specifies which libraries to test and what options to use for them.
591604
*/
592605
def runRegressiontest(branch, name, extraFlags, omsHash, dbPrefix, sshConfig, omcompiler, extrasimflags, boolean removePackageOrder, boolean conversionScript, int jobs=0, libs_config_file = 'configs/conf.json') {
593606
sh '''
@@ -646,11 +659,11 @@ def runRegressiontest(branch, name, extraFlags, omsHash, dbPrefix, sshConfig, om
646659
FMI_TESTING_FLAG="--fmi=true --fmisimulator='python3 -m fmpy' --default=ulimitExe=50"
647660
}
648661

649-
if (name.contains('basemodelica-mtk-import')) {
662+
if (name.contains('basemodelica_jl')) {
650663
sh """
651664
julia --project=TestBaseModelica -e 'import Pkg; Pkg.build(verbose=true); Pkg.precompile()'
652665
"""
653-
JULIA_TESTTING_FLAG="--basemodelica-mtk-import --extraflags=\"setCommandLineOptions(\\\"--baseModelica\\\");\""
666+
JULIA_TESTTING_FLAG="--basemodelica-mtk-import"
654667
}
655668

656669
OMCPATH = "${omcompiler ? '../' : './'}OMCompiler"

configs/basemodelica.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[
2+
{
3+
"library":"Modelica",
4+
"libraryVersion":"4.1.0",
5+
"libraryVersionExactMatch":true,
6+
"referenceFileExtension":"csv",
7+
"referenceFileNameDelimiter":"/",
8+
"referenceFileNameExtraName":"$ClassName",
9+
"referenceFiles":"$MSLREFERENCE/MAP-LIB_ReferenceResults/v4.1.0",
10+
"optlevel":"-Os -march=native"
11+
}
12+
]

0 commit comments

Comments
 (0)