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

Address various issues with meson builds #385

Merged
merged 6 commits into from
Apr 24, 2024
Merged

Address various issues with meson builds #385

merged 6 commits into from
Apr 24, 2024

Conversation

simo5
Copy link
Member

@simo5 simo5 commented Apr 23, 2024

Description

The change to the meson build system regressed some minor things that I am attempting to fix here:

  • Output also individual log files
    Meson defaults to a ginormous log file with the output of all tests mashed together, this works but makes looking at specific test failures harder.
  • Turn the custom targets that werre setting up tests into "tests", this allows us to run them only during the tests phase and not during the compile phase, which is unwanted
  • Add dependencies from tests to test executables so they are rebuilt if missing
  • Change make targets so we only build pkcs11.so and not all of the tests as well, this prevents coverity from flagging stuff in the test suite among other things
  • Do not run tests in parallel, there are some unstated dependencies between tests so they will flake randomly via race conditions. Until we can set proper dependencies between tests just disable parallel runs, it doesn't change the total run by much
  • Restore collection of individual log files

Checklist

  • Code modified for feature
  • Test suite updated with functionality tests
  • Test suite updated with negative tests
  • Documentation updated

Reviewer's checklist:

  • Any issues marked for closing are addressed
  • There is a test suite reasonably covering new functionality or modifications
  • This feature/change has adequate documentation added
  • Code conform to coding style that today cannot yet be enforced via the check style test
  • Commits have short titles and sensible commit messages
  • Coverity Scan has run if needed (code PR) and no new defects were found

@simo5
Copy link
Member Author

simo5 commented Apr 23, 2024

@ueno can you take a look at this one?

simo5 added 6 commits April 23, 2024 15:07
- This way test setup runs during meson test and not the compile test
- This way it runs only once
  I tried with add_test_setup() but that would cause the setup programs
  to be re-executed before each and every test

Signed-off-by: Simo Sorce <[email protected]>
This way they get built before the tests are run if not already

We mark these binary as not build by default, but that does nothing
because mesonbuild/meson#2518 which has
been open for only 6+ years now [face-palm.gif]

Signed-off-by: Simo Sorce <[email protected]>
Run setup only if needed.
Compile only pkcs11 but not all the tests as the main make target

Signed-off-by: Simo Sorce <[email protected]>
There are some dependencies between tests that are not explicit.
For the moment do not run tests in parallel to avoid spurious failures.

Signed-off-by: Simo Sorce <[email protected]>
Restore more ergonomic build failure review

Signed-off-by: Simo Sorce <[email protected]>
Copy link
Collaborator

@ueno ueno left a comment

Choose a reason for hiding this comment

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

Looks good to me, only a couple of nits.

Makefile Show resolved Hide resolved
tests/meson.build Show resolved Hide resolved
@simo5 simo5 merged commit 9d81483 into latchset:main Apr 24, 2024
24 of 27 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.

3 participants