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
Allow RunException to fail tests correctly #10909
Conversation
A couple RunException tests were allowed to pass when they should have been failing. However, we still want these tests to pass, so use expect_out, instead of expect_error for the deprecated tests located in misc/check_error. Closes idaholab#10907
@@ -67,7 +67,7 @@ def processResults(self, moose_dir, options, output): | |||
output += "#"*80 + "\n\nUnable to match the following pattern against the program's output:\n\n" + specs['expect_err'] + "\n" | |||
|
|||
if reason == '': | |||
RunApp.testFileOutput(self, moose_dir, options, output) | |||
reason = RunApp.testFileOutput(self, moose_dir, options, output) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woops :)
If RunApp.testFileOutput set this test as failed, this test would later (the next few lines) set it as pass.
Job Documentation on 0ef0fdf wanted to post the following: View the site here This comment will be updated on new commits. |
RunException tests need to exit with a non-zero. Closes idaholab#10907
@@ -18,3 +18,4 @@ | |||
sample.update() | |||
x = sample[0].getDistance() | |||
y = sample[0].getSample('invalid_name') # testing this error | |||
exit(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aeslaughter This test was a RunException
test that requires a non-zero exit status.
It is either this change or change the test spec into a RunApp
test with expect_out
and setting errors
to a dummy value (since there is an ERROR
in the output). Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just looking for the error in the output should be fine.
Allow line_sample_error to cause an exception, but use RunApp to capture expect_out. To do this, we need to suppress RunApp's default behavior of labeling this exception causing test as a failure, by overriding the errors parameter with a string which will never occur in the output. Closes idaholab#10907
The failing Mac Tests are not related to this PR |
A couple RunException tests were allowed to pass when they should
have been failing. However, we still want these tests to pass, so
use expect_out, instead of expect_error for the deprecated tests
located in misc/check_error.
Closes #10907