https://pantsbuild.org/ logo
l

little-salesmen-78240

11/08/2019, 1:36 PM
But it just seems to be ignored, is there anything else to setup to make it work?
h

hundreds-father-404

11/08/2019, 2:01 PM
What's the full command you're running?
l

little-salesmen-78240

11/08/2019, 2:07 PM
./pants --test-junit-test-shard=1/3 --cache-test-junit-ignore test targetpath/::
h

hundreds-father-404

11/08/2019, 2:07 PM
That looks right. What happens if you do
./pants --test-junit-test-shard=0/20 test targetpath/::
?
l

little-salesmen-78240

11/08/2019, 2:09 PM
same, in the end it executes all 249 tests
OK (249 tests)
h

hundreds-father-404

11/08/2019, 2:09 PM
Do you have this option set anywhere in
pants.ini
? Command line flag should override that, but as a sanity check
l

little-salesmen-78240

11/08/2019, 2:10 PM
it is not set in pants.ini
the relevant section in pants.ini:
👍 1
Untitled
h

hundreds-father-404

11/08/2019, 2:24 PM
What Pants version? I do not reproduce. In the Pants repo,
./pants test tests/java/org/pantsbuild/testing::
runs 3 tests.
./pants test --test-junit-test-shard=0/3 tests/java/org/pantsbuild/testing::
runs 1 test. Trying to figure out why yours is acting differently
l

little-salesmen-78240

11/08/2019, 2:25 PM
pants_version: 1.20.0
the tests are actually scala tests
I don't know if that changes smth
h

hundreds-father-404

11/08/2019, 2:26 PM
Ah, let me see if I can reproduce that
In your BUILD, are they marked as
junit_tests
still?
l

little-salesmen-78240

11/08/2019, 2:26 PM
yes
👍 1
h

hundreds-father-404

11/08/2019, 2:29 PM
I do reproduce this option not working for Scala targets. Hm. I'll investigate
l

little-salesmen-78240

11/08/2019, 2:29 PM
thanks very much for the help!
👖 1
🙂
h

hundreds-father-404

11/08/2019, 2:29 PM
How did you write your scala tests? Using
Scalatest
?
l

little-salesmen-78240

11/08/2019, 2:30 PM
yes
👍 1
should i open an issue?
h

hundreds-father-404

11/08/2019, 2:33 PM
Would you mind, please? We also have a contributor from Foursquare (big Scala user) who may be interested in working on this issue 🙂 For reproducing within Pants, this is what I ran:
Copy code
./pants test tests/scala/org/pantsbuild/zinc/analysis::

./pants test --test-junit-test-shard=0/4 tests/scala/org/pantsbuild/zinc/analysis::
Both ran 2 tests
l

little-salesmen-78240

11/08/2019, 3:28 PM
Alright! Thank you for the help
❤️ 1
6 Views