diff --git a/qa/qa-sample.json b/qa/qa-sample.json index d7f4f3ade349a4a9847d687e91ff35b9587d9b5d..5c71ce22831d81801393f7537e6018a1b85b6929 100644 --- a/qa/qa-sample.json +++ b/qa/qa-sample.json @@ -51,6 +51,9 @@ }, "tests": { + "# Whether tests are enabled or disabled by default": null, + "default": true, + "env": true, "os": true, "tags": true, diff --git a/qa/qa_config.py b/qa/qa_config.py index b4cff14f9c115bdf4d09f873525a56da1b0a29d1..e058a71d85a4697a724be9424bd165bd3f10c3d9 100644 --- a/qa/qa_config.py +++ b/qa/qa_config.py @@ -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():