Mercurial > public > mercurial-scm > hg-stable
diff tests/test-run-tests.t @ 27927:0de4dfc9af0c stable
run-tests: fix crash when --json and --blacklist are both used (issue5050)
This patch fixes a crash when both --json and --blacklist were given as
arguments of run-tests.py. Now, instead of crashing, we add an entry for
blacklisted tests in the json output to show that the tests were skipped.
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Tue, 19 Jan 2016 08:22:27 -0800 |
parents | df142b77b4c2 |
children | 54c896f8bb79 |
line wrap: on
line diff
--- a/tests/test-run-tests.t Thu Jan 21 12:37:12 2016 -0800 +++ b/tests/test-run-tests.t Tue Jan 19 08:22:27 2016 -0800 @@ -494,13 +494,21 @@ Missing skips or blacklisted skips don't count as executed: $ echo test-failure.t > blacklist - $ rt --blacklist=blacklist \ + $ rt --blacklist=blacklist --json\ > test-failure.t test-bogus.t ss Skipped test-bogus.t: Doesn't exist Skipped test-failure.t: blacklisted # Ran 0 tests, 2 skipped, 0 warned, 0 failed. - + $ cat report.json + testreport ={ + "test-bogus.t": { + "result": "skip" + }, + "test-failure.t": { + "result": "skip" + } + } (no-eol) #if json test for --json