-
Notifications
You must be signed in to change notification settings - Fork 234
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
CIBW_TEST_SKIP or CIBW_TEST_SELECT #529
Comments
As noted in #484, this seems like a sensible route to me. Might also be helpful for people building under emulation where the tests are mega slow. Perhaps worth debating how universal2 tests might fit into this, as maybe we could kill two birds with one stone. Could we have some identifiers like
I prefer skip, personally, as it's more natural to start with all the builds running tests, then remove them (default: `` 'skip nothing'). (I also don't think CIBW_SKIP is going anywhere, for similar reasons.) |
If we can extend the braces syntax, that should also help making things concise enough? |
The positive expression with We might have to be a bit careful with adding an extra bit to the testing selector, so as not to be too surprising with Maybe we could take advantage of the fact universal2 is made up of CIBW_TEST_SKIP: "*x86_64"
# Or, we we used a "positive" expression, either of these would work:
CIBW_TEST_SELECT: "!*x86_64"
CIBW_TEST_SELECT: "*arm64" Only downside is if you build a Universal2 wheel and a dedicated wheel, and you wanted to test the dedicated wheel but not the universal2 wheel part that matches the dedicated wheel, you couldn't do that. But that sounds totally reasonable to me, either you support testing an arch or you don't (in a job). |
Reminder, here are the docs for the wcmatch.fnmatch syntax we can use: https://facelessuser.github.io/wcmatch/fnmatch/#negateall That's exactly what we have now but in one line: a positive pattern selects, negative pattern subtracts, only negative patterns subtract from all. There are no ordering issues, order doesn't matter. Since we will be showing examples with no previous legacy behavior to worry about there, we could easily show examples like |
I would indeed expect skipping tests to be the exception (and maybe we should try encouraging that?), and in most/almost all cases I think I'm lightly for |
I can imagine a couple of use cases for a positive expression:
These are cooked up, not necessarily real or best practice. You could also argue it might be more elegant to look up the list of identifiers NumPy supports (you could even share this list), rather than just finding the intersection between what you support and what NumPy does not. |
Hmmm, true. I hadn't considered these, but "Only Python 3.9, because tests are expensive" could make sense, yes (which doesn't mean that (I don't really like the |
We could use You could keep SKIP around as an extra level of filter, but still go this path, I suppose. It could be handy to just globally disable |
CIBW_TEST_SKIP still seems to cover the main use-cases, for me, and is going to be more obvious what it does when scanning the option names. An idea for the universal2 archs - we could call the parts of a universal2 wheel |
Oh, so it's tricking this as a folder/file. 🤯 Have to think about it, maybe that would work? |
Oops, probably should wait until the universal part has been added. |
For the universal2 parts, I've settled on a colon, e.g. |
That looks quite good, indeed! |
We've added #484 , so I think this is done! |
This is a proposal for something like CIBW_TEST_SKIP, using build selectors to either eliminate or pick items to run on. After #527, maybe it should be a "positive" selector, since it's now easy to write both positive and negative selectors in one expression, and "CIBW_SKIP" might fade away. Not sure what to call it,
CIBW_TEST_BUILD
sounds a little odd, but is somewhat obvious that it's the same syntax.Originally posted by @henryiii in #484 (comment)
The text was updated successfully, but these errors were encountered: