From 0cab090f4d8a5ed0e4afd9fcc2a14efa442c9d46 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 10 Jan 2018 14:15:14 +0100 Subject: [PATCH] ipa-run-tests: make --ignore absolute, too ipa-run-tests now applies the same logic to --ignore then to included paths. https://pagure.io/freeipa/issue/7355 Signed-off-by: Christian Heimes Reviewed-By: Michal Reznik --- ipatests/ipa-run-tests | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ipatests/ipa-run-tests b/ipatests/ipa-run-tests index 018f86b71..d36fd3882 100755 --- a/ipatests/ipa-run-tests +++ b/ipatests/ipa-run-tests @@ -70,6 +70,15 @@ class ArgsManglePlugin(object): # a file or directory relative to ipatests package args[idx] = sep.join((os.path.join(HERE, filename), suffix)) + # replace ignores, e.g. "--ignore test_integration" is changed to + # "--ignore path/to/ipatests/test_integration" + if ns.ignore: + for ignore in ns.ignore: + idx = args.index(ignore) + if os.path.exists(ignore): + continue + args[idx] = os.path.join(HERE, ignore) + # rebuild early_config's known args with new args. The known args # are used for initial conftest.py from ipatests, which adds # additional arguments.