-
|
Context: on the platform I am using I sometimes have some error message that end up in the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
You can't have a base sanity function that will be called automatically, since every test has a single sanity function, either inherited or defined in the test. However, you can extend the base sanity function as follows: @rfm.simple_test
class HelloTest(rfm.RegressionTest, pin_prefix=True):
descr = 'C Hello World test'
# All available systems are supported
valid_systems = ['*']
valid_prog_environs = ['*']
sourcepath = 'hello.c'
tags = {'foo', 'bar'}
maintainers = ['VK']
@sanity_function
def validate(self):
return sn.assert_found(r'Hello, World\!', self.stdout)
@rfm.simple_test
class DerivedHello(HelloTest):
@sanity_function
def validate(self):
return sn.all([super().validate(), sn.assert_eq(self.job.exitcode, 0)])You would still have to change all your derived tests though to use this pattern. |
Beta Was this translation helpful? Give feedback.
You can't have a base sanity function that will be called automatically, since every test has a single sanity function, either inherited or defined in the test. However, you can extend the base sanity function as follows: