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

Allow RunException to fail tests correctly #10909

Merged
merged 3 commits into from Feb 28, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/TestHarness/testers/RunException.py
Expand Up @@ -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)
Copy link
Member Author

@milljm milljm Feb 26, 2018

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.


if reason != '':
self.setStatus(reason, self.bucket_fail)
Expand Down
13 changes: 9 additions & 4 deletions test/tests/misc/check_error/tests
Expand Up @@ -92,16 +92,16 @@
[../]

[./deprecated_param_default]
type = 'RunException'
type = 'RunApp'
input = 'deprecated_param_test.i'
expect_err = "The parameter \w+ is deprecated."
expect_out = "The parameter \w+ is deprecated."
cli_args = 'Kernels/nan/deprecated_default=1'
[../]

[./deprecated_param_no_default]
type = 'RunException'
type = 'RunApp'
input = 'deprecated_param_test.i'
expect_err = "The parameter \w+ is deprecated."
expect_out = "The parameter \w+ is deprecated."
cli_args = 'Kernels/nan/deprecated_no_default=1'
[../]

Expand Down Expand Up @@ -611,4 +611,9 @@
input = 'coupling_itself.i'
expect_err = "Coupled variable 'v' needs to be different from 'variable' with CoupledForce"
[../]
[./missing_input]
type = 'RunException'
input = 'missing_input_file.i'
expect_err = "Unable to open file"
[../]
[]