But it just seems to be ignored, is there anything...
# general
l
But it just seems to be ignored, is there anything else to setup to make it work?
h
What's the full command you're running?
l
./pants --test-junit-test-shard=1/3 --cache-test-junit-ignore test targetpath/::
h
That looks right. What happens if you do
./pants --test-junit-test-shard=0/20 test targetpath/::
?
l
same, in the end it executes all 249 tests
OK (249 tests)
h
Do you have this option set anywhere in
pants.ini
? Command line flag should override that, but as a sanity check
l
it is not set in pants.ini
the relevant section in pants.ini:
👍 1
Untitled
h
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
pants_version: 1.20.0
the tests are actually scala tests
I don't know if that changes smth
h
Ah, let me see if I can reproduce that
In your BUILD, are they marked as
junit_tests
still?
l
yes
👍 1
h
I do reproduce this option not working for Scala targets. Hm. I'll investigate
l
thanks very much for the help!
👖 1
🙂
h
How did you write your scala tests? Using
Scalatest
?
l
yes
👍 1
should i open an issue?
h
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
Alright! Thank you for the help
❤️ 1