Extract the junit xml report parser.

Review Request #4292 — Created Oct. 8, 2016 and submitted — Latest diff uploaded

jsirois
pants
jsirois/issues/3837/pytest_failures_use_junit_xml
3837, 3943
c2fd09f...
pants-reviews
benjyw, cheister, stuhood
This is the final step before re-using in pytest_run. Tests are added
for all the extracted code now that its no longer a private
implementation detail.

 src/python/pants/backend/jvm/tasks/BUILD                    |   3 +-
 src/python/pants/backend/jvm/tasks/junit_run.py             | 133 +++++--------------------------------
 src/python/pants/java/junit/BUILD                           |  11 +++
 src/python/pants/java/junit/__init__.py                     |   0
 src/python/pants/java/junit/junit_xml_parser.py             | 163 +++++++++++++++++++++++++++++++++++++++++++++
 tests/python/pants_test/java/junit/BUILD                    |  12 ++++
 tests/python/pants_test/java/junit/__init__.py              |   0
 tests/python/pants_test/java/junit/test_junit_xml_parser.py | 181 ++++++++++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 383 insertions(+), 120 deletions(-)

Locally green:

./pants test.pytest --no-timeouts \
  tests/python/pants_test/java/junit/ \
  tests/python/pants_test/backend/jvm/tasks:junit_run \
  tests/python/pants_test/backend/jvm/tasks:junit_run_integration \
  tests/python/pants_test/backend/jvm/tasks:junit_tests_concurrency_integration \
  tests/python/pants_test/backend/jvm/tasks:junit_tests_integration

CI went green here:
https://travis-ci.org/pantsbuild/pants/builds/166281880

Loading...