https://pantsbuild.org/ logo
#general
Title
# general
f

fancy-queen-20734

06/22/2020, 5:41 PM
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

witty-crayon-22786

06/22/2020, 6:50 PM
removing the deduping seems workable. but i expect that it will require changes to how code coverage is merged.
f

fancy-queen-20734

06/22/2020, 6:51 PM
yeah. I expect that it’ll fanout into how the run xml is processed as well
w

witty-crayon-22786

06/22/2020, 6:53 PM
ftr though: see the releases room: the v1 removal has begun
f

fancy-queen-20734

06/22/2020, 8:12 PM
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

witty-crayon-22786

06/24/2020, 7:27 PM
a v2 JVM backend would probably not dedupe, because it would default to the equivalent of
--no-fast
--chroot
3 Views