summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliyin <liyin11@huawei.com>2017-08-02 16:30:16 +0800
committerliyin <liyin11@huawei.com>2017-08-02 16:35:03 +0800
commit5b75906f3bcf91355bed14311d79d49d65982b6d (patch)
tree58b5ca9fbd0c37a6861bc427b53c08508cce730e
parent5eb95eff44e5e2ed35dc04cfe73549a8a160d8ce (diff)
Add modify output file function
JIRA: BOTTLENECK-176 Add function which could modify outfile name. Also a bug fix about yardstick docker version should be danube.3.1 Change-Id: I0e0bb5b26cae44358311d17932c698505560974c Signed-off-by: liyin <liyin11@huawei.com>
-rw-r--r--utils/infra_setup/runner/docker_env.py2
-rw-r--r--utils/parser.py14
2 files changed, 8 insertions, 8 deletions
diff --git a/utils/infra_setup/runner/docker_env.py b/utils/infra_setup/runner/docker_env.py
index ef50f4bc..64d049ba 100644
--- a/utils/infra_setup/runner/docker_env.py
+++ b/utils/infra_setup/runner/docker_env.py
@@ -45,7 +45,7 @@ def env_yardstick(docker_name):
volume = get_self_volume()
yardstick_tag = os.getenv("Yardstick_TAG")
if yardstick_tag is None:
- yardstick_tag = "danube3.1"
+ yardstick_tag = "danube.3.1"
env_docker = client.containers.run(image="opnfv/yardstick:%s"
% yardstick_tag,
privileged=True,
diff --git a/utils/parser.py b/utils/parser.py
index f130de44..2cdec57b 100644
--- a/utils/parser.py
+++ b/utils/parser.py
@@ -83,15 +83,15 @@ class Parser():
@classmethod
def testcase_out_dir(cls, testcase):
- suffix_name = os.getenv("SUFFIX_STRING")
- if suffix_name is None:
+ file_name = os.getenv("OUTPUT_FILE")
+ if file_name is None:
file_suffix = time.strftime('%H_%M', time.localtime(time.time()))
+ suffix_name = "_" + str(file_suffix)
+ out_name = cls.bottlenecks_config["log_dir"] + testcase
+ outfile_name = out_name + suffix_name + ".out"
else:
- file_suffix = suffix_name
- suffix_name = str(suffix_name)
- suffix_name = "_" + suffix_name
- out_name = cls.bottlenecks_config["log_dir"] + testcase + file_suffix
- outfile_name = out_name + ".out"
+ out_name = str(file_name)
+ outfile_name = cls.bottlenecks_config["log_dir"] + out_name
return outfile_name
@staticmethod