Add an affordance for 1 flag implying another.

Review Request #2562 - Created Aug. 3, 2015 and submitted

Information
John Sirois
pants
jsirois/JVM/implicit_debug
1911
b2060c2...
Reviewers
pants-reviews
areitz, benjyw, kwlzn
This adds an is_flagged helper to the OptionValueContainer
(get_options()), and the JVM subsystem leverages it to turn on debugging
whenever a user explicitly flags a custom debug port or custom debug
args on the command line.

The change also introduces a subsystem test utility and refactors option
value container faking.

 contrib/scrooge/tests/python/pants_test/contrib/scrooge/tasks/BUILD                                            |   7 +++-
 contrib/scrooge/tests/python/pants_test/contrib/scrooge/tasks/test_java_thrift_library_fingerprint_strategy.py |  10 ++---
 contrib/scrooge/tests/python/pants_test/contrib/scrooge/tasks/test_scrooge_gen.py                              |   4 +-
 src/python/pants/backend/jvm/subsystems/jvm.py                                                                 |   4 +-
 src/python/pants/backend/jvm/tasks/jvm_run.py                                                                  |   2 +-
 src/python/pants/option/option_value_container.py                                                              |  16 ++++++++
 tests/python/pants_test/BUILD                                                                                  |   1 +
 tests/python/pants_test/backend/codegen/subsystems/BUILD                                                       |   2 +-
 tests/python/pants_test/backend/codegen/subsystems/test_thrift_defaults.py                                     |   7 ++--
 tests/python/pants_test/backend/jvm/tasks/test_jvm_run.py                                                      |   5 +--
 tests/python/pants_test/backend/python/BUILD                                                                   |   2 +-
 tests/python/pants_test/backend/python/test_python_chroot.py                                                   |  35 +++++-----------
 tests/python/pants_test/base/BUILD                                                                             |   2 +-
 tests/python/pants_test/base/context_utils.py                                                                  |  51 +----------------------
 tests/python/pants_test/base_test.py                                                                           |  14 +++----
 tests/python/pants_test/jvm/subsystems/BUILD                                                                   |  18 +++++++++
 tests/python/pants_test/jvm/subsystems/__init__.py                                                             |   0
 tests/python/pants_test/jvm/subsystems/test_jvm.py                                                             |  80 ++++++++++++++++++++++++++++++++++++
 tests/python/pants_test/option/BUILD                                                                           |   8 ++++
 tests/python/pants_test/option/test_option_value_container.py                                                  |  16 ++++++++
 tests/python/pants_test/{subsystem => option/util}/BUILD                                                       |  12 +++---
 tests/python/pants_test/option/util/__init__.py                                                                |   0
 tests/python/pants_test/option/util/fakes.py                                                                   | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/python/pants_test/python/BUILD                                                                           |   2 +-
 tests/python/pants_test/python/test_interpreter_cache.py                                                       |  22 +++++-----
 tests/python/pants_test/subsystem/BUILD                                                                        |  15 +++++--
 tests/python/pants_test/subsystem/subsystem_util.py                                                            |  25 ++++++++++++
 27 files changed, 342 insertions(+), 128 deletions(-)
CI went green here:
  https://travis-ci.org/pantsbuild/pants/builds/73960359
John Sirois
John Sirois
Benjy Weinberger
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Loading...