always use relpath on --test file args, refactor execute in junit_run, add more integration tests
Review Request #1976 - Created March 23, 2015 and submitted
|Nick Howard (Twitter)|
|ity, jsirois, tejal, zundel|
Specifying the test to run prefixed with ./ fails because the ./ causes the src path to not match the paths in the classes_by_source product. This changes that so it will always create the relpath when trying to derive the classes. It also refactors execute to reduce nesting and clarify some of the flag / config interactions.
wrote regression test that fails, changed implementation to make it pass. CI baking here https://travis-ci.org/pantsbuild/pants/builds/55514326
nail down cwd behavior w/ tests + move working directory picking to __init__
Revision 2 (+105 -57)
OK - this still does not sound sane - there is no justification for the random pick (it can only be "tests don't care about CWD so we setup a random one" afaict). Really only the build root as cwd or else running tests each in their own BUILD parent dir sounds sane to me in this branch. As it stands this operates like a chaos monkey to smoke out tests that depend on a specific CWD afaict!. I won't block since this is pre-existing but if you agree with my take on all this a TODO and/or issue would be good.
--cwd changes look good to me. I realize handling that option is unique and unfamiliar. We use it at Square for all tests, but only configured through pants.ini, no one specifies it on the command line. If someone has great ideas on how to make it more usable, let's talk about it.