forked from twitter/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add optional support for auto-shading jvm tools.
When registering a jvm tool, the main classname of the tool can be specified to trigger auto-shading of the tool classpath. This functionality is dogfooded by JUnitRun for its junit-runner tool. This changes adds a test for bootstrap_jvm_tools.py that exercises the normal (legacy) and shading paths as well as updating the jvm_tool_task_test_base.py infra to work with this new shading option. The latter enables the pre-existing JUnitRunTest to operate, now using an auto-shaded jar. Testing Done: I manually tested shaded jar invalidation. It is costly (~6s for the junit-runner tool), so having the invalidation work correctly is important. Decent coverage for the bulk of the new code: ``` $ PANTS_PY_COVERAGE=modules:pants.backend.jvm.tasks.bootstrap_jvm_tools pants.dev test tests/python/pants_test/backend/jvm/tasks:bootstrap_jvm_tools ... 02:29:21 00:00 [test] 02:29:21 00:00 [run_prep_command] 02:29:21 00:00 [test] 02:29:21 00:00 [pytest] 02:29:21 00:00 [run] ============== test session starts =============== platform linux2 -- Python 2.7.8 -- py-1.4.26 -- pytest-2.6.4 plugins: timeout collected 1 items tests/python/pants_test/backend/jvm/tasks/test_bootstrap_jvm_tools.py . =========== 1 passed in 10.86 seconds ============ Name Stmts Miss Branch BrMiss Cover ------------------------------------------------------------------------------------------ src/python/pants/backend/jvm/tasks/bootstrap_jvm_tools 125 16 38 12 83% 02:29:34 00:13 [junit] 02:29:34 00:13 [specs] SUCCESS ``` CI went green here: https://travis-ci.org/pantsbuild/pants/builds/57984477 Bugs closed: 663, 1362, 1391 Reviewed at https://rbcommons.com/s/twitter/r/2052/
- Loading branch information
Showing
12 changed files
with
356 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.