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 support for tests that should fail at runtime #418

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

ahendriksen
Copy link
Contributor

@ahendriksen ahendriksen commented Sep 7, 2023

Description

closes #417

Add support for tests that should fail at runtime

That is compilation must be successful, but running the test should return a non-zero exit code.

This is useful for testing that code correctly asserts.

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

That is compilation must be successful, but running the test should
return a non-zero exit code.

This is useful for testing that code correctly asserts.
@ahendriksen ahendriksen requested review from a team as code owners September 7, 2023 20:48
@ahendriksen ahendriksen requested review from griwes and miscco and removed request for a team September 7, 2023 20:48
@miscco
Copy link
Collaborator

miscco commented Sep 8, 2023

Thanks a lot, I am hard pressed to find a better name than runfail but this is awesome and will help a lot keeping the library sane 🎉

@@ -210,14 +217,18 @@ def _evaluate_pass_test(self, test, tmpBase, lit_config,
env)
report = "Compiled With: '%s'\n" % ' '.join(compile_cmd)
report += libcudacxx.util.makeReport(cmd, out, err, rc)
if rc == 0:
result_expected = (rc == 0) == run_should_pass
Copy link
Collaborator

Choose a reason for hiding this comment

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

One day I will rewrite this as a switch over the number of possibilities but that day is not today

@miscco miscco merged commit 01abb1a into NVIDIA:main Sep 8, 2023
468 of 469 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[FEA]: Add support for tests that compile, but fail at runtime
3 participants