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

simulation: fix expect script; add failure string #342

Merged
merged 1 commit into from
Mar 16, 2024
Merged

Conversation

lsf37
Copy link
Member

@lsf37 lsf37 commented Mar 15, 2024

  • the syntax for the expect script wasn't quite right; now fixed.
  • add a failure string for early abort where the builds support that.

This should now close #339 and fix the problem introduced in #340.

- the syntax for the expect script wasn't quite right; now fixed.
- add a failure string for early abort where the builds support that.

Signed-off-by: Gerwin Klein <[email protected]>
@lsf37 lsf37 added the bug Something isn't working label Mar 15, 2024
@lsf37 lsf37 self-assigned this Mar 15, 2024
@lsf37 lsf37 requested a review from axel-h March 15, 2024 13:22
@lsf37
Copy link
Member Author

lsf37 commented Mar 15, 2024

Have confirmed in docker that at least for sel4test-sim it works as expected now and terminates correctly.

Copy link
Member

@wom-bat wom-bat left a comment

Choose a reason for hiding this comment

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

LGTM

def sim_script(success: str, failure=None, timeout=1200):
"""Return a script to run a simulation with timeout and expected success string.
Abort early on expected failure string."""
fail_str = "%s {exit 1}" % failure if failure else ""
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for adding some docs.

@lsf37 lsf37 merged commit d9f7a54 into master Mar 16, 2024
7 checks passed
@lsf37 lsf37 deleted the expect-fix branch March 16, 2024 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vm_minimal_sim run failure is not reported
2 participants