-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CompileOnlyRegressionTest
and parameter
#2108
Comments
Hi @yellowhat ! If I understand correctly, you want your If you want the first option, I'm afraid that you are correct and you have to manually set a dependency for each of the variants of your In any case, the relationship of these two tests could be better expressed using fixtures (see #1577), which is something that we're also working on right now :) |
@jjotero Thank for the reply. I have tried the following: import reframe as rfm
import reframe.utility.sanity as sn
from reframe.utility import import_module_from_file, udeps
from reframe.core.decorators import run_after, run_before
@rfm.simple_test
class AppBuildTest(rfm.CompileOnlyRegressionTest):
valid_systems = ["hpc:local"]
valid_prog_environs = ["*"]
build_system = "Spack"
param_0 = parameter(["app0", "app1"])
@run_before("compile")
def setup_build_system(self):
self.build_system.specs = [self.param_0]
self.build_system.install_tree = "$SPACK_ROOT/opt/spack"
@run_before("sanity")
def set_sanity_patterns(self):
self.sanity_patterns = sn.assert_found("Updating", self.stdout)
@rfm.simple_test
class AppRunTest(rfm.RunOnlyRegressionTest):
valid_systems = ["*"]
valid_prog_environs = ["*"]
executable = "date"
@run_after("init")
def set_depends_on(self):
for param in AppBuildTest.param_space:
self.depends_on(f"AppBuildTest_{param[0]}", udeps.fully)
# self.depends_on("AppBuildTest", udeps.fully)
# self.depends_on("AppBuildTest_app0", udeps.fully)
# self.depends_on("AppBuildTest_app1", udeps.fully)
@sanity_function
def assert_passed(self):
return True But I get the following: ./reframe/bin/reframe: could not resolve dependency: ('AppRunTest', 'generic:default', 'builtin') -> 'AppBuildTest_app0'
./reframe/bin/reframe: skipping all dependent test cases
- ('AppRunTest', 'generic:default', 'builtin') |
Oh, the @run_after("init")
def set_depends_on(self):
for v in AppBuildTest.param_space['param_0']:
self.depends_on(f"AppBuildTest_{v}", udeps.fully) |
Thanks |
Hi,
I would like to run multiple
CompileOnlyRegressionTest
depending on aparameter
and theRunOnlyRegressionTest
depend on them:This brings to:
./reframe/bin/reframe: could not resolve dependency: ('AppRunTest', 'hpc:local', 'gcc') -> 'AppBuildTest'
.Instead if I have:
reFrame is able to correctly identify the dependecies.
Am I misusing the
parameter
funciton?Thanks
The text was updated successfully, but these errors were encountered: