Skip to content

The order of execution of inherited hooks is currently undocumented and probably wrong #2268

@vkarak

Description

@vkarak

In the following example, we do not document in which order the hooks of the setup stage will execute:

class TestA(rfm.RunOnlyRegressionTest):
    @run_after('setup')
    def x(self):
        print('x')

class TestB(TestA):
    @run_after('setup')
    def y(self):
        print('y')

The order of execution is TestB.y, TestA.x, but this is not documented. This is quite important to be documented, because it affects test library design. Also I think that the order of execution is wrong, from a test library's perspective. If TestA is a library and sets some variable in a stage hook, I want to be able to use the value of that variable in my derived test.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions