Support absolute paths for spec_paths when they start with the build root and are supplied on the command line.

Review Request #867 - Created Aug. 12, 2014 and submitted

Information
John Sirois
pants
jsirois/cmd_line/absolute_path_affordance
471
Reviewers
pants-reviews
johanoskarsson, patricklaw
As proposed and discussed here: https://groups.google.com/d/topic/pants-devel/scbY4MM1XdM/discussion

commit 2cd0b3a76157b4ed552df33e7f4efb08c4c4f02e
Author: John Sirois <jsirois@twitter.com>
Date:   Tue Aug 12 11:04:57 2014 -0600

    Support absolute paths for spec_paths when they start with the build root and are supplied on the command line.

 src/python/pants/base/cmd_line_spec_parser.py             | 16 +++++++++++++---
 src/python/pants/docs/target_addresses.rst                | 11 ++++++++---
 tests/python/pants_test/base/test_cmd_line_spec_parser.py | 21 +++++++++++++++++++++
 3 files changed, 42 insertions(+), 6 deletions(-)
$ PANTS_DEV=1 ./pants goal test tests/python/pants_test/base/:cmd_line_spec_parser --test-pytest-options=-v
...
11:08:53 00:01   [test]
11:08:53 00:01     [pytest]
11:08:53 00:01       [run]
                     ============== test session starts ===============
                     platform linux2 -- Python 2.6.9 -- py-1.4.23 -- pytest-2.6.1 -- /usr/bin/python2.6
                     plugins: cov, timeout
                     collected 7 items 
                     
                     tests/python/pants_test/base/test_cmd_line_spec_parser.py::CmdLineSpecParserTest::test_absolute PASSED
                     tests/python/pants_test/base/test_cmd_line_spec_parser.py::CmdLineSpecParserTest::test_cmd_line_affordances PASSED
                     tests/python/pants_test/base/test_cmd_line_spec_parser.py::CmdLineSpecParserTest::test_cmd_line_spec_list PASSED
                     tests/python/pants_test/base/test_cmd_line_spec_parser.py::CmdLineSpecParserTest::test_does_not_exist PASSED
                     tests/python/pants_test/base/test_cmd_line_spec_parser.py::CmdLineSpecParserTest::test_normal PASSED
                     tests/python/pants_test/base/test_cmd_line_spec_parser.py::CmdLineSpecParserTest::test_sibling PASSED
                     tests/python/pants_test/base/test_cmd_line_spec_parser.py::CmdLineSpecParserTest::test_sibling_or_descendents PASSED
                     
                     ============ 7 passed in 0.13 seconds ============
                     
11:09:56 01:04     [junit]
11:09:56 01:04     [specs]
               SUCCESS

Issues

  • 0
  • 1
  • 0
  • 1
Description From Last Updated
John Sirois
Patrick Lawson
Johan Oskarsson
John Sirois
John Sirois
John Sirois
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Loading...