aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/features/copper.py
diff options
context:
space:
mode:
Diffstat (limited to 'testcases/features/copper.py')
-rwxr-xr-xtestcases/features/copper.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/testcases/features/copper.py b/testcases/features/copper.py
index c79754a1b..9be909427 100755
--- a/testcases/features/copper.py
+++ b/testcases/features/copper.py
@@ -15,12 +15,12 @@
# limitations under the License.
#
import argparse
-import os
import sys
import time
+
import functest.utils.functest_logger as ft_logger
import functest.utils.functest_utils as functest_utils
-import yaml
+
parser = argparse.ArgumentParser()
parser.add_argument("-r", "--report",
@@ -28,11 +28,10 @@ parser.add_argument("-r", "--report",
action="store_true")
args = parser.parse_args()
-with open(os.environ["CONFIG_FUNCTEST_YAML"]) as f:
- functest_yaml = yaml.safe_load(f)
-
-dirs = functest_yaml.get('general').get('directories')
-COPPER_REPO = dirs.get('dir_repo_copper')
+COPPER_REPO = functest_utils.get_parameter_from_yaml(
+ 'general.directories.dir_repo_copper')
+RESULTS_DIR = functest_utils.get_parameter_from_yaml(
+ 'general.directories.dir_results')
logger = ft_logger.Logger("copper").getLogger()
@@ -42,7 +41,10 @@ def main():
start_time = time.time()
- ret_val = functest_utils.execute_command(cmd, logger, exit_on_error=False)
+ log_file = RESULTS_DIR + "/copper.log"
+ ret_val = functest_utils.execute_command(cmd,
+ exit_on_error=False,
+ output_file=log_file)
stop_time = time.time()
duration = round(stop_time - start_time, 1)