aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--yardstick/benchmark/runners/base.py2
-rw-r--r--yardstick/cmd/commands/task.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/yardstick/benchmark/runners/base.py b/yardstick/benchmark/runners/base.py
index badc33565..30fa07639 100644
--- a/yardstick/benchmark/runners/base.py
+++ b/yardstick/benchmark/runners/base.py
@@ -25,7 +25,7 @@ def _output_serializer_main(filename, queue):
Use of this process enables multiple instances of a scenario without
messing up the output file.
'''
- with open(filename, 'w') as outfile:
+ with open(filename, 'a+') as outfile:
while True:
# blocks until data becomes available
record = queue.get()
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()