Skip to content
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

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

Open
casparvl opened this issue Sep 2, 2024 · 1 comment

Comments

@casparvl
Copy link

casparvl commented Sep 2, 2024

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 #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 :))

@vkarak
Copy link
Contributor

vkarak commented Oct 3, 2024

Yes, that could work and it's likely orthogonal to #2240.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

2 participants