-
Notifications
You must be signed in to change notification settings - Fork 63
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
Allow tests to be run concurrently #1854
Comments
I have started something in https://github.com/oowekyala/lingua-franca/tree/clem.dynamic-tests I changed the System.out calls to use the error reporter. Note that #1527 does the same thing in a more elegant way. My implementation uses JUnit's transparent parallelization capabilities, so we don't have to fiddle ourselves with a thread pool. Here are some of the problems this implementation is facing:
|
Indeed, this would be more challenging in C++ as there is shared build logic. However, this can be addressed by running the tests in multiple steps:
I don't think extending our test framework is worth the effort though. Parallel builds should be a core functionality of lingo. So perhaps we should run our integration tests through lingo to speed them up. |
Originally posted by @oowekyala in #1845 (comment)
In order to do this we would need to update our logging so that it does not just go directly to
System.out
. As it stands currently, if multiple tests are run at the same time their outputs will all get mixed together.We would also need to update the test framework so that each federated test uses different network ports. At least for C, the federated tests are maybe what would benefit the most from this because most other test categories except Zephyr tests finish in 3-10 minutes, whereas the federated tests can take 2 hours if many of the tests have deadlocks.
With these changes, I believe that we should be able to start a big thread pool in
validateAndRun
and submit all the tests in a given category to that thread pool, collecting the output in separate buffers. If we do this then that will motivate us to more rigorously ensure thatlfc
is not too vulnerable to file system races. It will also worsen our troubles with running out of heap space during tests, but we can see how severe that problem is when we come to it.I do not consider this issue to be very high priority, but it could lead to a large speedup in running the tests.
The text was updated successfully, but these errors were encountered: