Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch filesystem exception #1064

Merged
merged 1 commit into from
Jul 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions testsuite/fmi-cross-check/validateResults.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import os
import sys
import pandas as pd
import traceback

import pandas as pd
from OMPython import OMCSessionZMQ

# Start omc
omc = OMCSessionZMQ()
omc.sendExpression('getVersion()')
Expand Down Expand Up @@ -91,7 +93,10 @@ def validateResult(testFMUDir, resultDir, modelName, fmiType):
open(os.path.join(resultDir,"rejected"), "w").close()
print("\t REJECTED")
else:
open(os.path.join(resultDir,"failed"), "w").close()
try:
open(os.path.join(resultDir,"failed"), "w").close()
except:
print(f"\t {traceback.format_exc()}")
print("\t FAILED")
return

Expand Down Expand Up @@ -143,7 +148,7 @@ def validateGeneratedResults(crossCheckDir, platform, omsVersion):
for fmiType in ["me", "cs"]:
toolsDir = os.path.join(crossCheckDir, "fmus", fmiVersion, fmiType, platform)
for exportingToolID in os.listdir(toolsDir):
versionsDir = os.path.join(toolsDir, exportingToolID)
versionsDir = os.path.join(toolsDir, exportingToolID)
for exportingToolVersion in os.listdir(versionsDir):
fmusDir = os.path.join(versionsDir, exportingToolVersion)
for modelName in os.listdir(fmusDir):
Expand Down