aboutsummaryrefslogtreecommitdiffstats
path: root/xtesting/core
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2022-03-03 11:19:47 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2022-03-03 12:24:47 +0100
commitde9462d53155221a41a375c2964f65b399a268f0 (patch)
tree2647a9a503e1de8b89f83f8692fb509735ea54bf /xtesting/core
parent6c7486d7c43e3e89c50e23bc34eac212373ce3ad (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> (cherry picked from commit 318c2e427e2933fdff2213bf807249c66628b56f)
Diffstat (limited to 'xtesting/core')
-rw-r--r--xtesting/core/testcase.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/xtesting/core/testcase.py b/xtesting/core/testcase.py
index bccf76d2..744a59f1 100644
--- a/xtesting/core/testcase.py
+++ b/xtesting/core/testcase.py
@@ -62,7 +62,8 @@ class TestCase():
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