Mercurial > hg
diff tests/test-run-tests.t @ 47182:dff19fe2973c stable
run-tests: fix whitelist/blacklist with directories on Windows
The file name is resolved with `os.path.relpath()` in the `Test` constructor,
which yields `\` on Windows. That doesn't match the `/` separator when using
MSYS tools to build the list, and it isn't obvious that this is the problem
because directory separators can mostly be used interchangeably. The
`--test-list` argument already seems to be properly handled.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Wed, 05 May 2021 17:47:30 -0400 |
parents | af3a6900f893 |
children | 23f5ed6dbcb1 |
line wrap: on
line diff
--- a/tests/test-run-tests.t Thu Mar 11 23:20:41 2021 -0500 +++ b/tests/test-run-tests.t Wed May 05 17:47:30 2021 -0400 @@ -1116,15 +1116,17 @@ </testsuite> Missing skips or blacklisted skips don't count as executed: - $ echo test-failure.t > blacklist + $ mkdir tests + $ echo tests/test-failure.t > blacklist + $ cp test-failure.t tests $ rt --blacklist=blacklist --json\ - > test-failure.t test-bogus.t + > tests/test-failure.t tests/test-bogus.t running 2 tests using 1 parallel processes ss Skipped test-bogus.t: Doesn't exist Skipped test-failure.t: blacklisted # Ran 0 tests, 2 skipped, 0 failed. - $ cat report.json + $ cat tests/report.json testreport ={ "test-bogus.t": { "result": "skip" @@ -1133,6 +1135,8 @@ "result": "skip" } } (no-eol) + $ rm -r tests + $ echo test-failure.t > blacklist Whitelist trumps blacklist $ echo test-failure.t > whitelist