For a custom test subsystem, how do I add a skip o...
# plugins
r
For a custom test subsystem, how do I add a skip option that works?
1
g
Hmm! What have you tried that doesn't? 😄 Are we talking about per-target/file/... or global (e.g. pants.toml/CLI)?
r
Global
I added this option to my subsystem but that's all I've done
Copy code
skip_test = SkipOption("test")
Context is I have some custom acceptance testing logic that requires some auth and network connectivity to be set up, so I want to disable it by default.
g
Right, you shouldn't need anything more than that iirc, it should be picked up automatically.
Copy code
❯ pants test examples/with-tests/:: --rust-skip
Just works ootb, I didn't have a test skip option and all I did was add it to the subsystem
If you have a custom partitioner you'll need to handle it there
☝️ 1
r
ah yeah I do have a custom partitioner
g
Then just take your subsystem as a param and return no partitions if it's set 🙂
🙏 1
r
sweet that worked, thank you!
g
Awesome 🙂