Skip to content
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

Parallel tests #475

Merged
merged 3 commits into from
Apr 9, 2024
Merged

Parallel tests #475

merged 3 commits into from
Apr 9, 2024

Conversation

jktjkt
Copy link
Contributor

@jktjkt jktjkt commented Apr 8, 2024

Running tests in parallel was broken because these files all had some hard-coded port numbers. Some of these port numbers were OK, others were overlapping. Let's fix that by letting CMake manage these port numbers. However, to do that, one has to first convert the CMake setup to a "more idiomatic" approach with one function call per test. As a bonus, this gets rid of some "random variables" and the final test declarations are, hopefully, a bit easier to read. See the individual commits for descriptions.

jktjkt added 3 commits April 8, 2024 12:18
I'll be needing some per-test parameters to be auto-managed by CMake,
and doing that is very easy once there's a simple wrapper which adds
tests one at a time. As a bonus, this patch already makes the definition
of wrapped functions more readable.
This fixes parallel test execution. Without this patch, parallel runs
were dying all the time for me (I'm using -j16 because that's what I
have even on this laptop).

This patch is the reason why I was converting the test suite to use
one CMake function call per test.
...to make sure that we catch any possible hardcoded ports in future.
@Roytak
Copy link
Collaborator

Roytak commented Apr 8, 2024

The test suite could really use some updating and that is something I plan to do in the future. I think this is a good step forward and a nice change. The CMake looks way cleaner this way.

@michalvasko
Copy link
Member

Okay, thanks, merging.

@michalvasko michalvasko merged commit 957d8ec into CESNET:devel Apr 9, 2024
11 checks passed
@jktjkt jktjkt deleted the parallel-tests branch April 9, 2024 08:28
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.

3 participants