Clean up junit xml report file location logic.

Review Request #4211 - Created Sept. 8, 2016 and submitted

Information
John Sirois
pants
jsirois/issues/3837/prepare_junit_parse_extraction
3837, 3844
b57ceef...
Reviewers
pants-reviews
cheister, gmalmquist, zundel
This introduces a backport of itertools.accumulate and then uses it to
make the logic of scanning from more specific nested class report files
to less specific (containing class) ones a bit more coherent.

 src/python/pants/backend/jvm/tasks/BUILD        |  1 +
 src/python/pants/backend/jvm/tasks/junit_run.py |  9 ++++-----
 src/python/pants/util/BUILD                     |  6 +++++-
 src/python/pants/util/iterators.py              | 31 +++++++++++++++++++++++++++++++
 tests/python/pants_test/util/BUILD              |  8 ++++++++
 tests/python/pants_test/util/test_iterators.py  | 25 +++++++++++++++++++++++++
 6 files changed, 74 insertions(+), 6 deletions(-)

Locally green:

./pants test \
    tests/python/pants_test/util:iterators \
    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/158514392

John Sirois
John Sirois
Chris Heisterkamp
Patrick Stover
John Sirois
Review request changed

Status: Closed (submitted)

Change Summary:

Now on master:

git log -1 origin/master
commit e8345102c53ab6ff00f643f6d1d90c1cf4e7fd20
Author: John Sirois <john.sirois@gmail.com>
Date:   Fri Sep 9 09:57:09 2016 -0600

    Clean up junit xml report file location logic.
    
    This introduces a backport of itertools.accumulate and then uses it to
    make the logic of scanning from more specific nested class report files
    to less specific (containing class) ones a bit more coherent.
    
    Testing Done:
    Locally green:
    ```
    ./pants test \
        tests/python/pants_test/util:iterators \
        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/158514392
    
    Bugs closed: 3837, 3844
    
    Reviewed at https://rbcommons.com/s/twitter/r/4211/
Loading...