summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLaurent Bonnans <laurent.bonnans@here.com>2019-07-15 15:37:43 +0200
committerLaurent Bonnans <laurent.bonnans@here.com>2019-07-16 16:25:55 +0200
commit773276aa943390e73694385169207636e6caf036 (patch)
treef79d68e27cc920ca069e6ca7f4819bbc3c2b0743 /scripts
parentbdbc87e0ac6316d86a066ae7eecf27267a204e12 (diff)
downloadmeta-updater-773276aa943390e73694385169207636e6caf036.tar.gz
Use 128M by default for qemu in oe-selftests
Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/qemucommand.py9
-rwxr-xr-xscripts/run-qemu-ota1
2 files changed, 7 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
2from os import listdir 2from os import listdir
3import random 3import random
4import socket 4import socket
5from subprocess import check_output, CalledProcessError 5from subprocess import check_output
6 6
7EXTENSIONS = { 7EXTENSIONS = {
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
diff --git a/scripts/run-qemu-ota b/scripts/run-qemu-ota
index b2f55e9..de63297 100755
--- a/scripts/run-qemu-ota
+++ b/scripts/run-qemu-ota
@@ -26,6 +26,7 @@ def main():
26 dest='kvm', action='store_true', default=None) 26 dest='kvm', action='store_true', default=None)
27 kvm_group.add_argument('--no-kvm', help='Disable KVM in QEMU', 27 kvm_group.add_argument('--no-kvm', help='Disable KVM in QEMU',
28 dest='kvm', action='store_false') 28 dest='kvm', action='store_false')
29 parser.add_argument('--mem', default=None, help="Amount of memory the machine boots with")
29 parser.add_argument('--no-gui', help='Disable GUI', action='store_true') 30 parser.add_argument('--no-gui', help='Disable GUI', action='store_true')
30 parser.add_argument('--gdb', help='Export gdbserver port 2159 from the image', action='store_true') 31 parser.add_argument('--gdb', help='Export gdbserver port 2159 from the image', action='store_true')
31 parser.add_argument('--pcap', default=None, help='Dump all network traffic') 32 parser.add_argument('--pcap', default=None, help='Dump all network traffic')