Commit 59a8fe48 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

QA: Add default setting for tests

Commit 1010ec70

 enabled all tests by default. In some scenarios where
the configuration is static one may not want newly added tests to be
run.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 0de585fa
......@@ -56,6 +56,9 @@
},
"tests": {
"# Whether tests are enabled or disabled by default": null,
"default": true,
"env": true,
"os": true,
"tags": true,
......
......@@ -68,7 +68,14 @@ def TestEnabled(tests):
"""
if isinstance(tests, basestring):
tests = [tests]
return compat.all(cfg.get("tests", {}).get(t, True) for t in tests)
# Get settings for all tests
all_tests = cfg.get("tests", {})
# Get default setting
default = all_tests.get("default", True)
return compat.all(all_tests.get(name, default) for name in tests)
def GetMasterNode():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment