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

Add modularity checks in CI #268

Merged
merged 16 commits into from
Nov 6, 2023

Conversation

jean-roland
Copy link
Contributor

As the number of possible compile configuration evolve in 2^n, with n the number of configuration tokens, it will quickly become impossible to test them all manually. The goal with this automated check in CI is to:

  • Verify that all configurations compile, at least for linux.
  • Run a simple program along a zenoh router to test basic functionality

@Mallets
Copy link
Member

Mallets commented Oct 24, 2023

I just wonder if the checks for the CI should be done by directly testing the examples.
E.g., a bash script that compiles all the examples and tests the right value is returned. Like the examples fo return -2 if the right flags have not been used. Opinions?

@jean-roland
Copy link
Contributor Author

The thing is examples z_sub, z_query, and z_queryable don't return by themselves, they need to receive a 'q' through scanf

@p-avital
Copy link
Contributor

In zenoh-python, we have a python script that spawns the things in parallel, writes to stdin, and checks outputs

Copy link
Member

@cguimaraes cguimaraes left a comment

Choose a reason for hiding this comment

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

I agree with @Mallets on this. Either on the examples or the z_client_test.

Also, if I recall correctly, e.g. the queryable example shall not compile if the feature is disable (being explicitly on misconfiguration at compile time instead of runtime). But all the others examples shall compile as work as expected, including the existing tests.

Otherwise, @p-avital approach seems the way to go.

@jean-roland
Copy link
Contributor Author

Ok so I added a Python script to run the examples, write to their "stdin" pipes and check their outputs according to the compile-time feature configurations value.

A bit of issues translating from my machine to the CI but it should be good now.
Also modified the recently PR'ed freertos examples with the configuration options.

@Mallets Mallets merged commit 972fff3 into eclipse-zenoh:master Nov 6, 2023
44 checks passed
@jean-roland jean-roland deleted the ft_modularity_test branch November 6, 2023 09:52
This was referenced Nov 6, 2023
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.

None yet

4 participants