Fixup JvmRun only-write-cmd-line flag to accept relative paths.

Review Request #908 - Created Aug. 18, 2014 and submitted

Information
John Sirois
pants
jsirois/issues/494
494, 495
Reviewers
pants-reviews
benjyw, stuhood
commit 0b8e201c79a0d74ac35fdcd273c4fa2002fb3846
Author: John Sirois <jsirois@twitter.com>
Date:   Mon Aug 18 11:10:07 2014 -0600

    Fixup JvmRun  only-write-cmd-line flag to accept relative paths.
    
    Introduce expand_path fs utility and use it on JvmRun.
    Add tests for this new util and JvmRun's cmdline-only mode.

 src/python/pants/backend/jvm/tasks/BUILD       |  3 ++-
 src/python/pants/backend/jvm/tasks/jvm_run.py  | 21 +++++++++++----------
 src/python/pants/fs/fs.py                      |  5 +++++
 tests/python/pants_test/fs/test_expand_path.py | 42 ++++++++++++++++++++++++++++++++++++++++++
 tests/python/pants_test/tasks/BUILD            | 15 +++++++++++++++
 tests/python/pants_test/tasks/test_jvm_run.py  | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 123 insertions(+), 11 deletions(-)
$ PANTS_DEV=1 ./pants goal test tests/python/pants_test/tasks/:jvm_run tests/python/pants_test/fs --test-pytest-options="-v -k'test_jvm_run or test_expand_path'"
...
11:10:49 00:00   [test]
11:10:49 00:00     [pytest]
11:10:49 00:00       [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 12 items 
                     
                     tests/python/pants_test/fs/test_expand_path.py::ExpandPathTest::test_absolute PASSED
                     tests/python/pants_test/fs/test_expand_path.py::ExpandPathTest::test_dot_relative PASSED
                     tests/python/pants_test/fs/test_expand_path.py::ExpandPathTest::test_env_var_expansion PASSED
                     tests/python/pants_test/fs/test_expand_path.py::ExpandPathTest::test_pure_relative PASSED
                     tests/python/pants_test/fs/test_expand_path.py::ExpandPathTest::test_user_expansion PASSED
                     tests/python/pants_test/tasks/test_jvm_run.py::JvmRunTest::test_cmdline_only PASSED
                     
                      6 tests deselected by '-ktest_jvm_run or test_expand_path' 
                     ===== 6 passed, 6 deselected in 0.19 seconds =====
                     
11:10:50 00:01     [junit]
11:10:50 00:01     [specs]
               SUCCESS

Issues

  • 0
  • 1
  • 1
  • 2
Description From Last Updated
Benjy Weinberger
John Sirois
John Sirois
Benjy Weinberger
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

John Sirois

   
This is always True, fix here: https://rbcommons.com/s/twitter/r/911
Loading...