[tarantool-patches] [PATCH v1] Add exclude option
Alexander V. Tikhonov
avtikhon at tarantool.org
Fri Oct 18 07:52:48 MSK 2019
Added exclude option to be able to exclude the suites
from testing, it means that exclude option even excludes
the suites given with option suite.
Close #54
---
Github: https://github.com/tarantool/test-run/tree/avtikhon/gh-54-exclude-option
Issue: https://github.com/tarantool/test-run/issues/54
lib/options.py | 9 +++++++++
lib/worker.py | 4 +++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/lib/options.py b/lib/options.py
index 94dbd17..5270232 100644
--- a/lib/options.py
+++ b/lib/options.py
@@ -58,6 +58,15 @@ class Options:
help="""List of test suites to look for tests in. Default: "" -
means find all available.""")
+ parser.add_argument(
+ "--exclude",
+ dest = 'exclude',
+ metavar = "exclude",
+ nargs="*",
+ default = [],
+ help = """List of test suites to exclude from testing. Default: "" -
+ means no suites to exclude""")
+
parser.add_argument(
"--verbose",
dest='is_verbose',
diff --git a/lib/worker.py b/lib/worker.py
index 86852fa..8d31987 100644
--- a/lib/worker.py
+++ b/lib/worker.py
@@ -25,7 +25,9 @@ def find_suites():
if "suite.ini" in names:
suite_names.append(os.path.basename(root))
- suites = [TestSuite(suite_name, lib.Options().args)
+ exclude_names = lib.Options().args.exclude
+ suites = [(suite_name not in exclude_names and
+ TestSuite(suite_name, lib.Options().args))
for suite_name in sorted(suite_names)]
return suites
--
2.17.1
More information about the Tarantool-patches
mailing list