From da3dd62d820d7c0c73430a9e8080d67beabec8b6 Mon Sep 17 00:00:00 2001 From: Andreas <38031952+AnHeuermann@users.noreply.github.com> Date: Thu, 28 Jan 2021 19:01:02 +0100 Subject: [PATCH] Fix FMI Cross Check with Wine (#922) * Fix HTML generation fro fmi-cross-check with stable version * Update OMTLMSimulator and test wine execution - link with -static-libstdc++ on MINGW - Add check to Jenkins to see if wine can execute MINGW OMSimulator binary --- Jenkinsfile | 19 +++++++++++++++++++ OMTLMSimulator | 2 +- testsuite/fmi-cross-check/generateHTML.py | 5 ++++- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5a185d972..909a42589 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -574,6 +574,25 @@ EXIT /b 1 } } + stage('cross-compilation') { + agent { + docker { + image 'anheuermann/ompython:wine-bionic' + label 'linux' + alwaysPull true + } + } + environment { + HOME = "${env.WORKSPACE}" + } + steps { + unstash name: 'mingw64-install' + sh """ + wine64 install/mingw/bin/OMSimulator.exe --version + """ + } + } + stage('upload') { parallel { diff --git a/OMTLMSimulator b/OMTLMSimulator index 0e6f300c1..2003ef612 160000 --- a/OMTLMSimulator +++ b/OMTLMSimulator @@ -1 +1 @@ -Subproject commit 0e6f300c1fe0a50fb4c4b24b01d21dcf0de1c5dd +Subproject commit 2003ef612fcaab258470311f755ed2c7bc3dd6cf diff --git a/testsuite/fmi-cross-check/generateHTML.py b/testsuite/fmi-cross-check/generateHTML.py index 16d2d2f80..287db0860 100644 --- a/testsuite/fmi-cross-check/generateHTML.py +++ b/testsuite/fmi-cross-check/generateHTML.py @@ -99,7 +99,10 @@ def generateOverviewHTML(crossCheckDir, platform, omsVersion, omsVersionShort, t commitshort = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD'], cwd=crossCheckDir).decode('utf-8') commitfull = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=crossCheckDir).decode('utf-8') - omscommitshort = re.search(r"-g.+-",omsVersion).group()[2:9] + if re.search(r"-g.+-",omsVersion): + omscommitshort = re.search(r"-g.+-",omsVersion).group()[2:9] + else: + omscommitshort = "unknown" htmltpl=open("fmi-cross-check.html.tpl").read()