aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/cmd
diff options
context:
space:
mode:
authorpanghao1 <shamrock.pang@huawei.com>2015-06-30 04:10:11 +0000
committerpanghao1 <shamrock.pang@huawei.com>2015-07-15 01:55:40 +0000
commit3e3426f2cc0e44f4048d058b227fab2c9db3e5b9 (patch)
tree0a4c80ef10214b5c6c1cdfceb9f484e917e33eb8 /yardstick/cmd
parent39ace1211d91d83aff8c06f9db88126cc2ec6588 (diff)
Fix yardstick.out overwritten bug
The output of scenarios will be appended to the yardstick.out file. JIRA: YARDSTICK-45 Change-Id: I185c6d2a8a534c8bb2b731bb84c47bdf4bad4427 Signed-off-by: panghao1 <shamrock.pang@huawei.com>
Diffstat (limited to 'yardstick/cmd')
-rw-r--r--yardstick/cmd/commands/task.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/yardstick/cmd/commands/task.py b/yardstick/cmd/commands/task.py
index d562256ba..8b9f269c5 100644
--- a/yardstick/cmd/commands/task.py
+++ b/yardstick/cmd/commands/task.py
@@ -10,6 +10,7 @@
""" Handler for yardstick command 'task' """
import sys
+import os
import yaml
import atexit
import pkg_resources
@@ -47,6 +48,9 @@ class TaskCommands(object):
if args.parse_only:
sys.exit(0)
+ if os.path.isfile(args.output_file):
+ os.remove(args.output_file)
+
for context in Context.list:
context.deploy()