aboutsummaryrefslogtreecommitdiff
path: root/tests/vm/basevm.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vm/basevm.py')
-rwxr-xr-xtests/vm/basevm.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index 53b9515ee2..ed5dd4f3d0 100755
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -152,6 +152,11 @@ class BaseVM(object):
def build_image(self, img):
raise NotImplementedError
+ def exec_qemu_img(self, *args):
+ cmd = [os.environ.get("QEMU_IMG", "qemu-img")]
+ cmd.extend(list(args))
+ subprocess.check_call(cmd)
+
def add_source_dir(self, src_dir):
name = "data-" + hashlib.sha1(src_dir.encode("utf-8")).hexdigest()[:5]
tarfile = os.path.join(self._tmpdir, name + ".tar")