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

dry-policeman-7927

12/06/2019, 10:26 AM
Hi @hundreds-father-404 Daniel said that you may help I get error when run python integration test. The command is:
./pants --v2 --no-v1 test tests/python/pants_test/bin:integration
a

average-vr-56795

12/06/2019, 12:28 PM
FWICT
testprojects/src/python/nested_runs/run_pants_with_pantsd.py
explicitly shells out to
./pants
rather than using the
pants.pex
thing on CI… @hundreds-father-404 is this a test that needs v2 blacklisting until something fixes that up?
h

hundreds-father-404

12/06/2019, 4:35 PM
Is this a new test? That is the issue indeed
With a chroot,
src/python/pants/
becomes just `pants/. So now that test project is trying to execute a directory
a

average-vr-56795

12/06/2019, 4:40 PM
Yeah, new test
Which re-uses an existing testproject that explicitly calls
./pants
h

hundreds-father-404

12/06/2019, 4:41 PM
Was that test project being called with “run” before? Our test projects shard will only call “test” on it for example
The solution is to rename ./pants to ./pants.pex
a

average-vr-56795

12/06/2019, 4:43 PM
But only conditionally, right?
And this is an inner run of pants, so we’re presumably maybe stripping environment variables somewhere?
I believe that from our test (running in pants), we run a pants, which itself runs a pants
h

hundreds-father-404

12/06/2019, 4:44 PM
That’s one way of doing it. But I would always use pants.pex. This is why we always automatically bootstrap the pex when running tests now, to ensure that tests are using an up-to-date pants.pex
a

average-vr-56795

12/06/2019, 4:44 PM
Ok, so we can just unconditionally assume
pants.pex
exists?
h

hundreds-father-404

12/06/2019, 4:45 PM
Yes. The only condition where it will not exist or could be out-of-date is when the user has manually turned on NO_REGEN_PEX=true
a

average-vr-56795

12/06/2019, 4:47 PM
Sweet
Thanks!
❤️ 1
h

hundreds-father-404

12/06/2019, 4:50 PM
(Can that change be embedded into Katya’s PR for less CI runs?)
a

average-vr-56795

12/06/2019, 4:51 PM
It could… But independent change! 😛
d

dry-policeman-7927

12/09/2019, 1:49 PM
Eric, thank you! 🙌
❤️ 1
4 Views