Simplify failed test reporting.

Review Request #4240 - Created Sept. 15, 2016 and submitted

Information
John Sirois
pants
jsirois/issues/3837/simplify_junit_parse_interface
3837, 3874, 3879
5035894...
Reviewers
pants-reviews
benjyw, cheister, kwlzn
Simplify failed test discovery by scanning a flat dir for junit xml
report files. This structure re-working will enable re-use of test
failure reporting code in large part by the pytest task in the python
backend.

Along the way tighten some ad-hoc parsing and data structures by
introducing new _Test and _TestRegistry types. Also fixup 100 col
violations and some non-idomatic quotes and string formats.

 src/python/pants/backend/jvm/tasks/BUILD                                  |   5 +-
 src/python/pants/backend/jvm/tasks/coverage/base.py                       |  19 ++-
 src/python/pants/backend/jvm/tasks/coverage/cobertura.py                  |   8 +-
 src/python/pants/backend/jvm/tasks/junit_run.py                           | 424 +++++++++++++++++++++++++++++---------------------
 src/python/pants/task/testrunner_task_mixin.py                            |  46 +++---
 src/python/pants/util/BUILD                                               |   5 -
 src/python/pants/util/iterators.py                                        |  31 ----
 tests/python/pants_test/backend/jvm/tasks/coverage/test_base.py           |  31 ++--
 tests/python/pants_test/backend/jvm/tasks/test_junit_run_integration.py   |  48 ++++--
 tests/python/pants_test/backend/jvm/tasks/test_junit_tests_integration.py | 110 +++++++------
 tests/python/pants_test/util/BUILD                                        |   8 -
 tests/python/pants_test/util/test_iterators.py                            |  25 ---
 12 files changed, 389 insertions(+), 371 deletions(-)

Locally green:

./pants test-changed
./pants test $(./pants list tests/python/pants_test/backend/jvm/tasks/: 2>&1 | grep junit)

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

Issues

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

Status: Closed (submitted)

Change Summary:

Now on master:

git log -1 origin/master
commit 67925858cd5cdb1ec770c4e9aeeff288c80456fc
Author: John Sirois <john.sirois@gmail.com>
Date:   Sun Sep 18 16:15:21 2016 -0600

    Simplify failed test reporting.
    
    Simplify failed test discovery by scanning a flat dir for junit xml
    report files. This structure re-working will enable re-use of test
    failure reporting code in large part by the pytest task in the python
    backend.
    
    Along the way tighten some ad-hoc parsing and data structures by
    introducing new _Test and _TestRegistry types. Also fixup 100 col
    violations and some non-idomatic quotes and string formats.
    
    Testing Done:
    Locally green:
    ```
    ./pants test-changed
    ./pants test $(./pants list tests/python/pants_test/backend/jvm/tasks/: 2>&1 | grep junit)
    ```
    
    CI went green here:
      https://travis-ci.org/pantsbuild/pants/builds/160892990
    
    Bugs closed: 3837, 3874, 3879
    
    Reviewed at https://rbcommons.com/s/twitter/r/4240/
Loading...