diff options
author | lbonn <lbonn@users.noreply.github.com> | 2019-07-17 09:58:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-17 09:58:39 +0200 |
commit | b11e4ab227bed2e368646cb348e41a4603ed55e0 (patch) | |
tree | 8f5430210f314fc3ef7aead29beecf99047b8894 /scripts/qemucommand.py | |
parent | f68e1d59f0a0ed4341dad3b16d4979b1b63336d7 (diff) | |
parent | 5463396b1d47a122f5aef9a619244fd1777c0b56 (diff) | |
download | meta-updater-b11e4ab227bed2e368646cb348e41a4603ed55e0.tar.gz |
Merge pull request #537 from advancedtelematic/ci/oe-selftest
Ci/oe selftest
Diffstat (limited to 'scripts/qemucommand.py')
-rw-r--r-- | scripts/qemucommand.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/qemucommand.py b/scripts/qemucommand.py index 1049d7c..3045b45 100644 --- a/scripts/qemucommand.py +++ b/scripts/qemucommand.py | |||
@@ -2,7 +2,7 @@ from os.path import exists, join, realpath, abspath | |||
2 | from os import listdir | 2 | from os import listdir |
3 | import random | 3 | import random |
4 | import socket | 4 | import socket |
5 | from subprocess import check_output, CalledProcessError | 5 | from subprocess import check_output |
6 | 6 | ||
7 | EXTENSIONS = { | 7 | EXTENSIONS = { |
8 | 'intel-corei7-64': 'wic', | 8 | 'intel-corei7-64': 'wic', |
@@ -68,6 +68,10 @@ class QemuCommand(object): | |||
68 | self.mac_address = random_mac() | 68 | self.mac_address = random_mac() |
69 | self.serial_port = find_local_port(8990) | 69 | self.serial_port = find_local_port(8990) |
70 | self.ssh_port = find_local_port(2222) | 70 | self.ssh_port = find_local_port(2222) |
71 | if args.mem: | ||
72 | self.mem = args.mem | ||
73 | else: | ||
74 | self.mem = "1G" | ||
71 | if args.kvm is None: | 75 | if args.kvm is None: |
72 | # Autodetect KVM using 'kvm-ok' | 76 | # Autodetect KVM using 'kvm-ok' |
73 | try: | 77 | try: |
@@ -95,7 +99,7 @@ class QemuCommand(object): | |||
95 | cmdline += ["-drive", "file=%s,if=ide,format=raw,snapshot=on" % self.image] | 99 | cmdline += ["-drive", "file=%s,if=ide,format=raw,snapshot=on" % self.image] |
96 | cmdline += [ | 100 | cmdline += [ |
97 | "-serial", "tcp:127.0.0.1:%d,server,nowait" % self.serial_port, | 101 | "-serial", "tcp:127.0.0.1:%d,server,nowait" % self.serial_port, |
98 | "-m", "1G", | 102 | "-m", self.mem, |
99 | "-usb", | 103 | "-usb", |
100 | "-object", "rng-random,id=rng0,filename=/dev/urandom", | 104 | "-object", "rng-random,id=rng0,filename=/dev/urandom", |
101 | "-device", "virtio-rng-pci,rng=rng0", | 105 | "-device", "virtio-rng-pci,rng=rng0", |
@@ -131,4 +135,3 @@ class QemuCommand(object): | |||
131 | "-f", "qcow2", | 135 | "-f", "qcow2", |
132 | self.overlay] | 136 | self.overlay] |
133 | return cmdline | 137 | return cmdline |
134 | |||