reframe icon indicating copy to clipboard operation
reframe copied to clipboard

ReFrame detects the test has undefined parameters, but doesn't say which ones

Open casparvl opened this issue 5 months ago • 1 comments

I sometimes get

WARNING: skipping test 'X': test has one or more undefined parameters

And recently got the same question from a user who was trying to run one of my tests. I found https://github.com/reframe-hpc/reframe/issues/2240 which is related, and read the answer, but... I don't fully understand the issue here. Wouldn't a piece of code like:

if (cls.is_abstract()):
    params = cls.param_space.params
    undefined_params = []
    for param in params:
        if not cls.param_space.defines(param):
            undefined_params.append(param)
    # Raise more detailed warning
    getlogger().warning(
        f'skipping test {cls.__qualname__!r}: '
        f'test has one or more undefined parameters:'
        ", ".join(undefined_params)
    )

Replacing this segment of code do the trick?

I've seen the argumentation in #2240 that tracing it back to the line might be difficult, and that's fine by me. But naming which parameter is undefined can already be a big help. Sure, users would still have to see where that parameter is defined, and why it is possible undefined, but they'd have a clear starting point for the search :)

Disclaimer: I haven't actually tested the code above, but it seems like this is how it should work (famous last words :))

casparvl avatar Sep 02 '24 15:09 casparvl