If you want to be able to run the same junit tests...
# general
f
If you want to be able to run the same junit tests in different environments, eg java 8 and java 11, how would you expect that to be expressed in BUILD files? I’m working on making some affordances around that, and I wanted to see what folks here thought.
Currently, pants dedupes junit tests by class name when assigning them to targets. This has the effect of preventing multiple platform / same test class targets from being run in the same pants run
the options I see are • do nothing and document that you can’t run these tests together • change the test registry so that the environment elements are included in the key • change the test registry to allow multiple targets to own a given test • other less good options would include shading/renaming the test cases by platform
• break out targets s.t. one target owns the sources, and one per platform owns running the test classes
w
removing the deduping seems workable. but i expect that it will require changes to how code coverage is merged.
f
yeah. I expect that it’ll fanout into how the run xml is processed as well
w
ftr though: see the releases room: the v1 removal has begun
f
yeah. I’ll have to put it in v1 stuff on the twitter release branch
I brought it up here, because it’s something to consider in v2 as well
w
a v2 JVM backend would probably not dedupe, because it would default to the equivalent of
--no-fast
--chroot