diff options
author | Dave Reisner <dreisner@archlinux.org> | 2020-05-02 18:12:32 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2020-05-05 01:14:32 +0200 |
commit | cebda6d0ee4c58521cafd9d0980c8b79cc068602 (patch) | |
tree | e6f4b23196f5eb157bbca9c020cb198cb701fb4c /test/pacman/pmenv.py | |
parent | 0b81fb64d3f36710d3988ab49feae8c7cc37c1af (diff) | |
download | pacman-cebda6d0ee4c58521cafd9d0980c8b79cc068602.tar.gz pacman-cebda6d0ee4c58521cafd9d0980c8b79cc068602.tar.xz |
meson: handle XFAIL tests outside of TAP
This change causes expected fail tests to actually fail by eliding the
'# TODO' from the test plan. In turn, we can now properly use
'should_fail' in the meson test() rule and see these expected fail
tests in the output:
Before:
...
320/332 upgrade077.py OK 0.12679290771484375 s
321/332 upgrade078.py OK 0.12620115280151367 s
322/332 upgrade080.py OK 0.1252129077911377 s
...
Ok: 332
Expected Fail: 0
Fail: 0
Unexpected Pass: 0
Skipped: 0
Timeout: 0
After:
...
320/332 upgrade077.py OK 0.12679290771484375 s
321/332 upgrade078.py EXPECTEDFAIL0.12620115280151367 s
322/332 upgrade080.py OK 0.1252129077911377 s
...
Ok: 326
Expected Fail: 6
Fail: 0
Unexpected Pass: 0
Skipped: 0
Timeout: 0
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'test/pacman/pmenv.py')
-rw-r--r-- | test/pacman/pmenv.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/pacman/pmenv.py b/test/pacman/pmenv.py index 24437b61..d87193f2 100644 --- a/test/pacman/pmenv.py +++ b/test/pacman/pmenv.py @@ -70,5 +70,10 @@ class pmenv(object): t.run(self.pacman) tap.diag("==> Checking rules") - tap.todo = t.expectfailure + # When running under meson, we don't emit 'todo' in the plan and instead + # handle expected failures in the test() objects. This really should be + # fixed in meson: + # https://github.com/mesonbuild/meson/issues/2923#issuecomment-614647076 + tap.todo = (t.expectfailure and + not 'RUNNING_UNDER_MESON' in os.environ) tap.subtest(lambda: t.check(), t.description) |