diff --git a/tests/support/parser/__init__.py b/tests/support/parser/__init__.py index 6fdea2e2f656..5e3af5e7737d 100644 --- a/tests/support/parser/__init__.py +++ b/tests/support/parser/__init__.py @@ -598,12 +598,12 @@ def _validate_options(self): self.validate_options() - if self.support_destructive_tests_selection: + if self.support_destructive_tests_selection and not os.environ.get('DESTRUCTIVE_TESTS', None): # Set the required environment variable in order to know if # destructive tests should be executed or not. os.environ['DESTRUCTIVE_TESTS'] = str(self.options.run_destructive) - if self.support_expensive_tests_selection: + if self.support_expensive_tests_selection and not os.environ.get('EXPENSIVE_TESTS', None): # Set the required environment variable in order to know if # expensive tests should be executed or not. os.environ['EXPENSIVE_TESTS'] = str(self.options.run_expensive)