OpenModelica / OpenModelicaLibraryTesting

Test script for OMCompiler+OpenModelicaLibraries
Other
9 stars 13 forks source link

extraSimFlags entry gets overridden #40

Open bilderbuchi opened 1 year ago

bilderbuchi commented 1 year ago

According to the Readme, I am defining an entry "extraSimFlags": "-lv=LOG_NLS" in the config file entry for a library, expecting to see Nonlinear System logging messages that could help troubleshoot a failing test (that does not fail on my local machine).

Unfortunately, in the logs I find:

Regular simulation: ./mymodel -abortSlowSimulation -alarm=480 -lv=LOG_NLS -lv LOG_STATS stdout | warning | Command line option 'lv' specified again. Value has been overriden from 'LOG_NLS' to 'LOG_STATS'.

So, unexpectedly, it does not seem possible to define this extra/additional simulation flag.

A quick search in the codebase finds https://github.com/OpenModelica/OpenModelicaLibraryTesting/blob/680d9f69aa2e9a12d3ec9a2ef677cc2370bd4540/testmodel.py#L459 which is probably responsible for this problem.

Expected behaviour

Extra simulation flags are added in addition to default ones.

casella commented 1 year ago

@bilderbuchi a similar issue was solved in OpenModelica/OpenModelica#7860, while others are still pending, see OpenModelica/OpenModelica#7861.

Maybe @mahge can comment on that.