import struct
import json
import signal
+import logging
# This will not work if arguments contain spaces but is necessary if we
super(VM, self).__init__(qemu_prog, qemu_opts, name=name,
test_dir=test_dir,
socket_scm_helper=socket_scm_helper)
- if debug:
- self._debug = True
self._num_drives = 0
+ def add_object(self, opts):
+ self._args.append('-object')
+ self._args.append(opts)
+ return self
+
def add_device(self, opts):
self._args.append('-device')
self._args.append(opts)
else:
output = StringIO.StringIO()
+ logging.basicConfig(level=(logging.DEBUG if debug else logging.WARN))
+
class MyTestRunner(unittest.TextTestRunner):
def __init__(self, stream=output, descriptions=True, verbosity=verbosity):
unittest.TextTestRunner.__init__(self, stream, descriptions, verbosity)