https://pantsbuild.org/ logo
#pex
Title
# pex
a

average-vr-56795

10/19/2018, 5:43 PM
e

enough-analyst-54434

10/19/2018, 5:47 PM
So, that's a bit of a weird pex. It's entrypoint is py.test which - without args, scans cwd for files to test (ie it won't look at the -D in the pex
Is that what you mean to be doing?
Wouldn't remote exec not -D, but put sources on fs via snapshot?
If you want to embed sources to test in the pex you'd need to mark it zip_safe False so it explodes on startup and then make sure PWD was the explode dir (may already be the case but I don't think so)
a

average-vr-56795

10/19/2018, 5:52 PM
Let me step back a level
How would you write a test that that running an entrypoint which exits non-zero leads to pex exiting non-zero?
e

enough-analyst-54434

10/19/2018, 5:53 PM
Suggestion on the PR, but like you're doing - just don't try to make py.test do things it doesn't understand - like run on files inside a pex. Use the pex like a binary and pass it CLI args - the same ones that work with un-pexed pytest
It's the -D that is left field reading the test - kill it
a

average-vr-56795

10/19/2018, 5:56 PM
Cool, thanks 🙂
Ugh, still failing 😞 Would you mind taking a quick look? I”m sure it’s something trivial… Sorry, I’m about to disappear on holiday!
Oh, only failing on OSX?
That’s… Confusing…
e

enough-analyst-54434

10/19/2018, 6:12 PM
Looking, but OSX has only 2 interesting facts that bite that I know of - realpath (var/tmp) and HFS case wierdness
Time to test locally or print stdout/stderr from subproc call
a

average-vr-56795

10/19/2018, 6:13 PM
I ran locally on OSX and it worked :S
Not with a temp_dir to be fair
e

enough-analyst-54434

10/19/2018, 6:14 PM
Higher in log:
Copy code
============================= test session starts ==============================
platform darwin -- Python 2.7.15, pytest-3.9.1, py-1.7.0, pluggy-0.8.0
rootdir: /var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/tmpLg6evn, inifile:
collecting 0 items                                                             
========================= no tests ran in 0.01 seconds =========================
ERROR: not found: /var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/tmpLg6evn/tester.py
(no name '/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/tmpLg6evn/tester.py' in any of [])
a

average-vr-56795

10/19/2018, 6:21 PM
Is that obviously meaningful to you? :)
e

enough-analyst-54434

10/19/2018, 6:22 PM
Nope. I'd try combinations of os.path.realpath - and you might try hacking down .travis.yml to 1 shard and
tox -e<ENV> -- -vsk<failing test>
a

average-vr-56795

10/19/2018, 6:31 PM
realpath did the job 🙂 Thanks for your help!
e

enough-analyst-54434

10/19/2018, 6:31 PM
You're welcome