Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion configs/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@
"libraryVersionNameForTests":""
},
{
"library":"BuildSysPro"
"library":"BuildSysPro",
"_comment":"IncludeDirectory says modelica://BuildSysPro/Resources/C-Sources, which does not exist; the IBPSA C sources are in IBPSA/Resources/C-Sources (Resources/IBPSA/C-Sources in 3.5.0 and older). Some of them call str*/malloc/ModelicaError without including the header",
"extraCustomCommands":["setCFlags(getCFlags() + \" -include string.h -include stdlib.h -include ModelicaUtilities.h \\\"-I$libraryLocation/IBPSA/Resources/C-Sources\\\" \\\"-I$libraryLocation/Resources/IBPSA/C-Sources\\\"\")"]
},
{
"library":"BusinessSimulation"
Expand Down
11 changes: 9 additions & 2 deletions testmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,10 +508,13 @@ def simulateCmd(resimulate):

execTimeTranslateModel=monotonic()-start
simres = None
buildFailed = False
if useSimulate:
simres = res or {}
# A failed translate/build is only reported in the messages of the record
res = not (simres.get("messages") or "").startswith("Failed to build model")
# A failed translate/build is only reported in the messages of the record; the
# translation clocks below say which of the two it was
buildFailed = (simres.get("messages") or "").startswith("Failed to build model")
res = True
err = omc.sendExpression("OpenModelica.Scripting.getErrorString()")
total = omc.sendExpression("OpenModelica.Scripting.Internal.Time.timerTock(OpenModelica.Scripting.Internal.Time.RT_CLOCK_SIMULATE_TOTAL)")-total_before
buildmodel = omc.sendExpression("OpenModelica.Scripting.Internal.Time.timerTock(OpenModelica.Scripting.Internal.Time.RT_CLOCK_BUILD_MODEL)")
Expand Down Expand Up @@ -573,6 +576,10 @@ def simulateCmd(resimulate):
# a resimulate leaves it in the simulation time
execstat["build"] = simres["timeCompile"] if useSimulate else 0.0
execstat["phase"] = 5
if buildFailed:
with open(errFile, 'a+') as fp:
fp.write(simres.get("messages") or "")
writeResultAndExit(0, False, omc, omc_new)
else:
if isWin:
res = checkOutputTimeout("\"%s\\share\\omc\\scripts\\Compile.bat\" %s gcc %s parallel dynamic 24 0" % (conf["omhome"], conf["fileName"], msysEnvironment), conf["ulimitOmc"], conf)
Expand Down
Loading