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 a RUN-FAIL command? #2

Closed
sheredom opened this issue Apr 20, 2019 · 2 comments
Closed

Add a RUN-FAIL command? #2

sheredom opened this issue Apr 20, 2019 · 2 comments

Comments

@sheredom
Copy link
Contributor

First off - thanks for this awesome lib - so cool that someone already thought about bringing the power of lit to cargo!

One thing I'm using this for is to assert that when a command fails a specific error message is printed out (for a little compiler project I'm working on). At the minute I'm having to do:

// RUN: my_command_that_fails || echo xfail

Is there any chance we could add something like RUN-FAIL or RUN-XFAIL that didn't throw an error if the executable returned non-zero?

@dylanmckay
Copy link
Owner

Thanks! Yes, LLVM's lit is the best general purpose testing tool I've used.

How does LLVM do this?

If you want to mock something up, I'm happy to review/merge it.

@sheredom
Copy link
Contributor Author

sheredom commented Jan 9, 2021

I totally forgot to do anything here sorry. Honestly in the end I just used bash's failing_exe | echo to ensure a 0 return, worked fine!

@sheredom sheredom closed this as completed Jan 9, 2021
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

No branches or pull requests

2 participants