Skip to content

E001 update tests#439

Merged
adeas31 merged 17 commits into
OpenModelica:masterfrom
syntron:E001-update_tests
Jun 22, 2026
Merged

E001 update tests#439
adeas31 merged 17 commits into
OpenModelica:masterfrom
syntron:E001-update_tests

Conversation

@syntron

@syntron syntron commented Feb 27, 2026

Copy link
Copy Markdown
Contributor

(E001) update tests (v4.x.x)

[test_*] reorder imports

[tests_ModelicaDoE*] fix pylint hint

* use .items()

[tests_*] use OMSessionABC.get_version()

[test_ModelicaSystemCmd] use get_model_name() instead of access to private variable _model_name

[test_ModelicaSystemOMC] read file using utf-8 encoding / linter fix

[test_ModelicaSystemRunner] update test case

* ModelicaSystemRunner & OMCPath
* ModelicaSystemRunner & OMPathRunnerLocal
* ModelicaSystemRunner & OMPathRunnerBash
* ModelicaSystemRunner & OMPathRunnerBash using docker
* ModelicaSystemRunner & OMPathRunnerBash using WSL (not tested!)

[test_OMCPath] update test case

* OMCPath & OMCSessionZMQ
* OMCPath & OMCSessionLocal
* OMCPath & OMCSessionDocker
* OMCPath & OMCSessionWSL (not tested!)
* OMPathLocal & OMCSessionRunner
* OMPathBash & OMCSessionRunner
* OMPathBash & OMCSessionRunner in docker
* OMPathBash & OMCSessionRunner in WSL (not tested!)

add workflow to run unittests in ./tests

[test_OMParser] use only the public interface => om_parser_basic()

[test_OMTypedParser] rename file / use om_parser_typed()

update tests - do NOT run test_FMIRegression.py

reason:
* it is only a test for OMC / not OMPython specific
* furthermore, it is run automatically via cron job (= FMITest)

[test_ModelExecutionCmd] rename from test_ModelicaSystemCmd

[test_*] reorder imports

[tests_ModelicaDoE*] fix pylint hint

* use .items()

[tests_*] use OMSessionABC.get_version()

[test_ModelicaSystemCmd] use get_model_name() instead of access to private variable _model_name

[test_ModelicaSystemOMC] read file using utf-8 encoding / linter fix

[test_ModelicaSystemRunner] update test case

* ModelicaSystemRunner & OMCPath
* ModelicaSystemRunner & OMPathRunnerLocal
* ModelicaSystemRunner & OMPathRunnerBash
* ModelicaSystemRunner & OMPathRunnerBash using docker
* ModelicaSystemRunner & OMPathRunnerBash using WSL (not tested!)

[test_OMCPath] update test case

* OMCPath & OMCSessionZMQ
* OMCPath & OMCSessionLocal
* OMCPath & OMCSessionDocker
* OMCPath & OMCSessionWSL (not tested!)
* OMPathLocal & OMCSessionRunner
* OMPathBash & OMCSessionRunner
* OMPathBash & OMCSessionRunner in docker
* OMPathBash & OMCSessionRunner in WSL (not tested!)

add workflow to run unittests in ./tests

[test_OMParser] use only the public interface => om_parser_basic()

[test_OMTypedParser] rename file / use om_parser_typed()

update tests - do NOT run test_FMIRegression.py

reason:
* it is only a test for OMC / not OMPython specific
* furthermore, it is run automatically via cron job (= FMITest)

[test_ModelExecutionCmd] rename from test_ModelicaSystemCmd
@syntron syntron force-pushed the E001-update_tests branch from 0487757 to 043fb27 Compare May 11, 2026 18:37
@adeas31

adeas31 commented May 20, 2026

Copy link
Copy Markdown
Member

The simulation on Windows takes more time. Increase the default timeout of 10s in OMCSession/ModelicaSystem.

@syntron syntron force-pushed the E001-update_tests branch from 5f60214 to 4795464 Compare May 20, 2026 19:28
* windows unittests on github need a longer time to run the tests
@syntron syntron force-pushed the E001-update_tests branch from 4795464 to 72a18da Compare May 20, 2026 19:55
@syntron

syntron commented May 20, 2026

Copy link
Copy Markdown
Contributor Author

it is now down to docker / windows failing

@syntron syntron force-pushed the E001-update_tests branch from aae87fb to a5ff0a1 Compare May 20, 2026 20:31
@adeas31

adeas31 commented May 21, 2026

Copy link
Copy Markdown
Member

I updated the timeout to 5 mins but it still fails. I think something is stuck when running tests/test_linearization.py::test_getters. I will try to run it locally on machine and debug it.

@adeas31

adeas31 commented May 22, 2026

Copy link
Copy Markdown
Member

Running the test alone works fine https://github.com/OpenModelica/OMPython/actions/runs/26285383965/job/77371637784?pr=439

I will debug more.

@adeas31

adeas31 commented May 22, 2026

Copy link
Copy Markdown
Member

If i run pytest with --log-cli-level=DEBUG then it works fine. This is very strange.

@adeas31

adeas31 commented Jun 8, 2026

Copy link
Copy Markdown
Member

I still haven't got enough time to look into this. Will try to debug this more asap.

@syntron

syntron commented Jun 14, 2026

Copy link
Copy Markdown
Contributor Author

@adeas31 Any point where I can help?

@adeas31

adeas31 commented Jun 16, 2026

Copy link
Copy Markdown
Member

@adeas31 Any point where I can help?

I will let you know.
I am running all the test locally now on my Windows machine. Lets see if I can find something.

@adeas31

adeas31 commented Jun 18, 2026

Copy link
Copy Markdown
Member

This seems to work fine with increased timeout of workflow timeout-minutes: 120.

The FMI import tests were failing for Windows. I am trying to get them fixed in OpenModelica OpenModelica/OpenModelica#15864. For now I have skipped the test to see if this PR passes.

@adeas31 adeas31 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works finally.

I added inputs for pytest in the workflow and increased the workflow timeout.
Also increased the command execution timeout from 10 secs to 5 minutes. I noticed that the timeout is defined in OMCSession, ModelExecutionCmd and ModelicaSystemCmd. AFAIU we only need it defined in OMCSession. ModelExecutionCmd uses the timeout from OMCSession and ModelicaSystemCmd then uses ModelExecutionCmd. Perhaps we can improve this in another PR. For now I will merge this one.

@adeas31 adeas31 merged commit 149f654 into OpenModelica:master Jun 22, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants