Fix a scope bug for java agent manifest writing.

Review Request #768 - Created July 28, 2014 and submitted

Information
John Sirois
pants
jsirois/publish/fix_agent_manifest
401
Reviewers
pants-reviews
jinfeng, johanoskarsson
commit 9ebaa5dc21b22175af5581f906fef157e01a6d06
Author: John Sirois <jsirois@twitter.com>
Date:   Sat Jul 26 00:23:17 2014 -0600

    Fix a scope bug for java agent manifest writing.
    
    Also fix a JavaAgent validation bug revelead by adding a test for
    JarBuilder agent handling.

 src/python/pants/backend/jvm/targets/java_agent.py |  2 +-
 src/python/pants/backend/jvm/tasks/jar_task.py     | 34 ++++++++++++------------
 tests/python/pants_test/tasks/test_jar_task.py     | 71 ++++++++++++++++++++++++++++++++++++++++++++++----
 3 files changed, 84 insertions(+), 23 deletions(-)
$ PANTS_DEV=1 ./pants goal test tests/python/pants_test/tasks/:jar_task --test-pytest-options=-v
...
18:05:24 00:01   [test]
18:05:24 00:01     [pytest]
18:05:24 00:01       [run]
                     ============== test session starts ===============
                     platform linux2 -- Python 2.6.9 -- py-1.4.22 -- pytest-2.5.2 -- /usr/bin/python2.6
                     plugins: cov, timeout
                     collected 6 items 
                     
                     tests/python/pants_test/tasks/test_jar_task.py:111: JarTaskTest.test_custom_manifest PASSED
                     tests/python/pants_test/tasks/test_jar_task.py:86: JarTaskTest.test_overwrite_write PASSED
                     tests/python/pants_test/tasks/test_jar_task.py:102: JarTaskTest.test_overwrite_writestr PASSED
                     tests/python/pants_test/tasks/test_jar_task.py:57: JarTaskTest.test_update_write PASSED
                     tests/python/pants_test/tasks/test_jar_task.py:73: JarTaskTest.test_update_writestr PASSED
                     tests/python/pants_test/tasks/test_jar_task.py:133: JarBuilderTest.test_agent_manifest PASSED
                     
                     ============ 6 passed in 1.27 seconds ============
                     
18:05:26 00:03     [junit]
18:05:26 00:03     [specs]
               SUCCESS
John Sirois
Jin Feng
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Loading...