Skip to content

Commit

Permalink
[lit] Do a better job at parsing unsupported tests.
Browse files Browse the repository at this point in the history
When all the tests run by dotest are unsupported, it still reports
RESULT: PASSED which we translate to success for lit. We can better
report the status as unsupported when we see that there are unsupported
tests but no passing tests. This will not affect the situation where
there are failures or unexpected passes, because those report a non-zero
exit code.

Differential revision: https://reviews.llvm.org/D68039

llvm-svn: 372914
  • Loading branch information
JDevlieghere committed Sep 25, 2019
1 parent 2364695 commit 3a7da6a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lldb/lit/Suite/lldbtest.py
Expand Up @@ -102,6 +102,11 @@ def execute(self, test, litConfig):
if 'XPASS:' in out or 'XPASS:' in err:
return lit.Test.XPASS, out + err

has_unsupported_tests = 'UNSUPPORTED:' in out or 'UNSUPPORTED:' in err
has_passing_tests = 'PASS:' in out or 'PASS:' in err
if has_unsupported_tests and not has_passing_tests:
return lit.Test.UNSUPPORTED, out + err

passing_test_line = 'RESULT: PASSED'
if passing_test_line not in out and passing_test_line not in err:
msg = ('Unable to find %r in dotest output (exit code %d):\n\n%s%s'
Expand Down

0 comments on commit 3a7da6a

Please sign in to comment.