Skip to content
Snippets Groups Projects
Commit 69a15dd7 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>
(cherry picked from commit 59a8fe48)
parent 1817dca9
No related branches found
No related tags found
No related merge requests found
...@@ -51,6 +51,9 @@ ...@@ -51,6 +51,9 @@
}, },
"tests": { "tests": {
"# Whether tests are enabled or disabled by default": null,
"default": true,
"env": true, "env": true,
"os": true, "os": true,
"tags": true, "tags": true,
......
...@@ -68,7 +68,14 @@ def TestEnabled(tests): ...@@ -68,7 +68,14 @@ def TestEnabled(tests):
""" """
if isinstance(tests, basestring): if isinstance(tests, basestring):
tests = [tests] 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(): def GetMasterNode():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment