aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincenzo Maffione <[email protected]>2017-04-08 12:43:43 +0200
committerVincenzo Maffione <[email protected]>2017-04-08 12:43:43 +0200
commit23ed7dceee1eecff9e80862b650824deb5bdb187 (patch)
tree5c63d41e5ddbd109fdfe245b6fe2c57ed50f7ec4
parent6818af98498a890bcca9cbc8034aaa1a733e6230 (diff)
downloadrumba-23ed7dceee1eecff9e80862b650824deb5bdb187.tar.gz
rumba-23ed7dceee1eecff9e80862b650824deb5bdb187.zip
testsbeds: qemu: qemu logs directory defaults to pwd
-rw-r--r--rumba/testbeds/qemu.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/rumba/testbeds/qemu.py b/rumba/testbeds/qemu.py
index 82ad873..897af37 100644
--- a/rumba/testbeds/qemu.py
+++ b/rumba/testbeds/qemu.py
@@ -28,14 +28,14 @@ import rumba.model as mod
class Testbed(mod.Testbed):
def __init__(self, exp_name, username, bzimage, initramfs, proj_name="ARCFIRE", password="",
- use_vhost=True, qemu_out_folder=""):
+ use_vhost=True, qemu_logs_dir=None):
mod.Testbed.__init__(self, exp_name, username, password, proj_name)
self.vms = {}
self.shims = []
self.bzimage = bzimage
self.initramfs = initramfs
self.vhost = use_vhost
- self.qemu_folder = qemu_out_folder
+ self.qemu_logs_dir = os.getcwd() if qemu_logs_dir is None else qemu_logs_dir
self.boot_processes = []
@staticmethod
@@ -222,7 +222,7 @@ class Testbed(mod.Testbed):
time.sleep(boot_backoff)
booting_budget = boot_batch_size
- with open(self.qemu_folder + '/qemu_out{}'.format(vmid), 'w') as out_file:
+ with open('%s/qemu_out_%s' % (self.qemu_logs_dir, vmid), 'w') as out_file:
print('DEBUG: executing >> {}'.format(command))
self.boot_processes.append(subprocess.Popen(command.split(), stdout=out_file))
pass