Skip to content

test: build and run real studies end to end - #607

Open
Sahil-u07 wants to merge 1 commit into
ControlCore-Project:devfrom
Sahil-u07:test/e2e-studies
Open

Sahil-u07 wants to merge 1 commit into
ControlCore-Project:devfrom
Sahil-u07:test/e2e-studies

Conversation

@Sahil-u07

Copy link
Copy Markdown
Contributor

Right now nothing in the tests actually runs a study that mkconcore generates, each binding is only tested on its own. This adds tests/test_e2e_studies.py, which builds testZ (python/python) and testZC (python controller, C++ plant) from testsou with mkconcore in posix mode, runs them, and checks both nodes get to the end of their loop. It runs in the existing test job since g++ is already on the ubuntu runners, and skips on Windows.

Writing it turned up a real bug: C++ nodes don't compile from a generated study at all. Since the header dedupe, concore.hpp and concoredocker.hpp include concore_base.hpp, but mkconcore only ever copied concore.hpp. So mkconcore now copies concore_base.hpp as well, in the posix, windows and docker build scripts, same as it already does for concore_base.py.

I also tried testVZ (verilog/python) but under load the verilog controller sometimes hangs right before the end of the run, so I left it out for now and will look into that separately.

Before

On dev the C++ node of testZC fails to compile:

before

After

after

Nothing in the test suite ever ran a generated study, every binding was
only tested on its own. tests/test_e2e_studies.py builds testZ
(python/python) and testZC (python controller, C++ plant) from testsou
with mkconcore, runs them and checks both nodes reach the end of their
loop. It skips on Windows since the posix scripts need bash, and skips
testZC when g++ isn't installed.

This caught that C++ nodes don't compile from a generated study at all.
concore.hpp and concoredocker.hpp include concore_base.hpp since the
header dedupe, but mkconcore only ever copied concore.hpp. It now copies
concore_base.hpp too, in the posix, windows and docker build scripts.
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.

1 participant