From 1fbc8086d445b53547f19b436da93579949c93ae Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Thu, 3 Mar 2022 11:19:47 +0100 Subject: Allow overriding project_name via env MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (cherry picked from commit 318c2e427e2933fdff2213bf807249c66628b56f) --- xtesting/core/testcase.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xtesting/core/testcase.py') 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 -- cgit 1.2.3-korg