aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils/functest_utils.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2017-05-19 22:23:52 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2017-05-19 23:04:49 +0200
commitd5e8713a186d07fe33c904bbf0bb3a43cb518700 (patch)
tree754b48914fe96bd41cbc8b6578bbec9458ff8158 /functest/utils/functest_utils.py
parent3c8f13cc1c832ec08fde0a3b502fe688f4597259 (diff)
Set default value for CONFIG_FUNCTEST_YAML
It calculates via the full path of env.py. Change-Id: Ief958833f5116cdb116d0153d85a0ae03063ec5c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/utils/functest_utils.py')
-rw-r--r--functest/utils/functest_utils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/functest/utils/functest_utils.py b/functest/utils/functest_utils.py
index bf30f56ee..284c79719 100644
--- a/functest/utils/functest_utils.py
+++ b/functest/utils/functest_utils.py
@@ -24,6 +24,7 @@ from six.moves import urllib
import yaml
from git import Repo
+from functest.utils import constants
from functest.utils import decorators
logger = logging.getLogger(__name__)
@@ -375,7 +376,7 @@ def get_parameter_from_yaml(parameter, file):
def get_functest_config(parameter):
- yaml_ = os.environ["CONFIG_FUNCTEST_YAML"]
+ yaml_ = constants.CONST.__getattribute__('CONFIG_FUNCTEST_YAML')
return get_parameter_from_yaml(parameter, yaml_)
@@ -397,7 +398,7 @@ def get_testcases_file_dir():
def get_functest_yaml():
- with open(os.environ["CONFIG_FUNCTEST_YAML"]) as f:
+ with open(constants.CONST.__getattribute__('CONFIG_FUNCTEST_YAML')) as f:
functest_yaml = yaml.safe_load(f)
f.close()
return functest_yaml