Skip to content

Dynamic pipeline stages #1936

@jjotero

Description

@jjotero

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']

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions