Skip to content
Discussion options

You must be logged in to vote

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 vali…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vkarak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants