If the junit output file doesn't exist, that should still count as an error on the target.

Review Request #3407 — Created Feb. 1, 2016 and submitted

sameerbrenn
pants
pants-reviews
benjyw, stuhood

If the junit output file doesn't exist, that should still count as an error on the target. We have some junit tests in our repo that fail outside of an actual testmethod, so the junit xml output file doesn't get created. If that file doesn't get created, it's a failure of the target, so that target should still be in TestFailedTaskError even though we don't have a testmethod and testclass.

build-support/bin/unit-tests.sh

The tests that fail in our repo are quite inscrutable so I can't tell how to create a simple unit test for this. Would it be ok to submit this as-is?

It works on the degenerate tests in our repo.

WI
  1. 
      
  2. You should be still able to output some info about the test since 'test' is in the scope

    1. Ah yes, thanks Yi.

  3. 
      
SA
SA
BE
  1. This is a good idea anyway, for general robustness. But I do think you should force the owners of those degenerate tests to just fix them...

  2. 
      
ST
  1. 
      
  2. 
      
SA
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as 71304f977695cc19c8c19d2d6b28599e090d19fa

Loading...