diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2022-03-03 11:19:47 +0100 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2022-03-03 12:17:04 +0100 |
commit | 318c2e427e2933fdff2213bf807249c66628b56f (patch) | |
tree | 3371123b18a970f8812c93c409fd73c4f0aa5e42 /xtesting/core | |
parent | 6e7f515947c54d3ed9bb3df9cc2014fc1baaea51 (diff) |
Allow overriding project_name via env
It now offers a new env var, PROJECT_NAME, to override the default
value in testcases.yaml.
Change-Id: I911f1af56afe88edb37de40176733b65bc8e490a
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'xtesting/core')
-rw-r--r-- | xtesting/core/testcase.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xtesting/core/testcase.py b/xtesting/core/testcase.py index 179a5684..b44ed793 100644 --- a/xtesting/core/testcase.py +++ b/xtesting/core/testcase.py @@ -60,7 +60,8 @@ class TestCase(metaclass=abc.ABCMeta): def __init__(self, **kwargs): self.details = {} - self.project_name = kwargs.get('project_name', 'xtesting') + self.project_name = os.environ.get( + 'PROJECT_NAME', kwargs.get('project_name', 'xtesting')) self.case_name = kwargs.get('case_name', '') self.criteria = kwargs.get('criteria', 100) self.result = 0 |