-
Notifications
You must be signed in to change notification settings - Fork 117
Closed
Description
With the changes introduced with #1865, it is now possible to extend the hook functionality and attach hooks to other hooks. The use case for this becomes trivial with test libraries, where one may want to extend the functionality of a hook from a base class. For example
# File 1
class Base(rfm.RegressionTest):
...
@run_before('compile')
def set_compiler_flags(self):
self.build_system.cxxflags = ['-O3']
# File 2
from file1 import Base
class Derived(Base):
...
@run_after('set_compiler_flags')
def extend_compiler_flags(self):
self.build_system.cxxflags += ['--amdgpu-target=gfx900']