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

Fix the philosopher test for Renode #25

Merged
merged 4 commits into from
Oct 28, 2024
Merged

Fix the philosopher test for Renode #25

merged 4 commits into from
Oct 28, 2024

Conversation

d3zd3z
Copy link
Collaborator

@d3zd3z d3zd3z commented Oct 28, 2024

Trying to update the Rust code in mainline was causing test failures. The main issue is that this was running renode, and we were not locally. This can cause two problems:

  • Renode outputs some extra text before each line from the target messages. Fix this by changing the regex and the printed messages a bit.
  • Renode runs in real time, and this test sleeps quite a bit, causing it to time out.
    This fix does a few things:
  • Adds renode to the CI workflow
  • Adds the m2gl025_miv target, a RISC-V 32 board supported by renode
  • Adds a "c:" to the front of the part of the output messages we are interested in
  • Changes the sample.yaml file to not anchor the message to the beginning of the line, but to look for the "c:".
  • Adjust the timeout option on the CI workflow to match how it is run in the main Zephyr repo.

With this, CI should give us a better indicator if the build is likely to work when brought into main.

@d3zd3z d3zd3z force-pushed the phil-timeout branch 4 times, most recently from 47140cb to 1523a2b Compare October 28, 2024 15:06
Copy the renode installation from the Zephyr CI docker image.  This will
run these tests in the module before being detected in main.

Signed-off-by: David Brown <[email protected]>
The philosopher test seems to run in real time on qemu, and ends up
taking just about a minute, the default timeout.

Signed-off-by: David Brown <[email protected]>
The renode simulator prints some log message text in front of each debug
message, which unfortunately causes the tests to fail.  Fix this by
adding a "c:" in front of the part we want to match, and removing the
anchor from the regex.

Signed-off-by: David Brown <[email protected]>
Make sure we test these in the module so failures are detected before it
moves to the main repo.

Signed-off-by: David Brown <[email protected]>
@d3zd3z d3zd3z merged commit b765109 into main Oct 28, 2024
1 check 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.

4 participants