diff --git a/reframe/core/pipeline.py b/reframe/core/pipeline.py index 9e87c01557..b16a1e7be3 100644 --- a/reframe/core/pipeline.py +++ b/reframe/core/pipeline.py @@ -603,7 +603,7 @@ def pipeline_hooks(cls): #: #: :: #: - #: self.sanity_patterns = sn.assert_found(r'.*', self.stdout) + #: self.sanity_patterns = sn.assert_true(1) sanity_patterns = variable(_DeferredExpression, type(None), value=None) #: Patterns for verifying the performance of this test. diff --git a/reframe/frontend/loader.py b/reframe/frontend/loader.py index 9305d493af..7036d58495 100644 --- a/reframe/frontend/loader.py +++ b/reframe/frontend/loader.py @@ -81,7 +81,8 @@ def _validate_check(self, check): name = type(check).__name__ checkfile = os.path.relpath(inspect.getfile(type(check))) - required_attrs = ['valid_systems', 'valid_prog_environs'] + required_attrs = ['sanity_patterns', + 'valid_systems', 'valid_prog_environs'] for attr in required_attrs: if getattr(check, attr) is None: getlogger().warning( diff --git a/unittests/resources/checks/bad/invalid_check.py b/unittests/resources/checks/bad/invalid_check.py index ec4a20c2f5..e6a9ab159e 100644 --- a/unittests/resources/checks/bad/invalid_check.py +++ b/unittests/resources/checks/bad/invalid_check.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: BSD-3-Clause import reframe as rfm +import reframe.utility.sanity as sn @rfm.simple_test @@ -11,6 +12,7 @@ class SomeTest(rfm.RegressionTest): def __init__(self): self.valid_systems = [] self.valid_prog_environs = [] + self.sanity_patterns = sn.assert_true(1) class NotATest: diff --git a/unittests/resources/checks/emptycheck.py b/unittests/resources/checks/emptycheck.py index a57a4b2c44..b3d284c3fe 100644 --- a/unittests/resources/checks/emptycheck.py +++ b/unittests/resources/checks/emptycheck.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: BSD-3-Clause import reframe as rfm +import reframe.utility.sanity as sn @rfm.simple_test @@ -11,3 +12,4 @@ class EmptyTest(rfm.RegressionTest): def __init__(self): self.valid_systems = [] self.valid_prog_environs = [] + self.sanity_patterns = sn.assert_true(1) diff --git a/unittests/resources/checks/frontend_checks.py b/unittests/resources/checks/frontend_checks.py index ac2004b16a..ebc746856e 100644 --- a/unittests/resources/checks/frontend_checks.py +++ b/unittests/resources/checks/frontend_checks.py @@ -243,6 +243,7 @@ class TestWithGenerator(rfm.RunOnlyRegressionTest): def __init__(self): self.valid_systems = ['*'] self.valid_prog_environs = ['*'] + self.sanity_patterns = sn.assert_true(1) def foo(): yield True @@ -257,6 +258,7 @@ class TestWithFileObject(rfm.RunOnlyRegressionTest): def __init__(self): self.valid_systems = ['*'] self.valid_prog_environs = ['*'] + self.sanity_patterns = sn.assert_true(1) with open(__file__) as fp: pass diff --git a/unittests/resources/checks_unlisted/good.py b/unittests/resources/checks_unlisted/good.py index 905d1af6df..a53db2a784 100644 --- a/unittests/resources/checks_unlisted/good.py +++ b/unittests/resources/checks_unlisted/good.py @@ -8,6 +8,7 @@ # import reframe as rfm +import reframe.utility.sanity as sn # We just import this individually for testing purposes from reframe.core.pipeline import RegressionTest @@ -17,6 +18,7 @@ class _Base(RegressionTest): def __init__(self): self.valid_systems = ['*'] self.valid_prog_environs = ['*'] + self.sanity_patterns = sn.assert_true(1) @rfm.parameterized_test(*((x, y) for x in range(3) for y in range(2))) diff --git a/unittests/resources/checks_unlisted/kbd_interrupt.py b/unittests/resources/checks_unlisted/kbd_interrupt.py index f02bd6b345..3ed4d3803f 100644 --- a/unittests/resources/checks_unlisted/kbd_interrupt.py +++ b/unittests/resources/checks_unlisted/kbd_interrupt.py @@ -11,6 +11,7 @@ # import reframe as rfm +import reframe.utility.sanity as sn @rfm.simple_test @@ -21,6 +22,7 @@ def __init__(self): self.valid_systems = ['*'] self.valid_prog_environs = ['*'] self.tags = {self.name} + self.sanity_patterns = sn.assert_true(1) @rfm.run_before('setup') def raise_keyboard_interrupt(self):