support/scripts/boot-qemu-image.py: don't fail if start-qemu.sh is missing
authorRomain Naour <romain.naour@gmail.com>
Tue, 24 Nov 2020 20:30:19 +0000 (21:30 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 5 Dec 2020 21:33:27 +0000 (22:33 +0100)
When boot-qemu-image.py script was added, we wanted to run
each qemu defconfig in gitlab, so we expect that all qemu
defconfig generate the script start-qemu.sh in images
directory.

Don't make it a hard requirement even if we prefer to be
able to do a runtime test for each qemu defconfig.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
support/scripts/boot-qemu-image.py

index dbbba552ad6b47f532de57a15538c1c4006159d5..4066788c8850830b683fa2c37b957061360e2ce9 100755 (executable)
@@ -18,6 +18,10 @@ def main():
     if not sys.argv[1].startswith('qemu_'):
         sys.exit(0)
 
+    if not os.path.exists('output/images/start-qemu.sh'):
+        print('qemu-start.sh is missing, cannot test.')
+        sys.exit(0)
+
     qemu_start = os.path.join(os.getcwd(), 'output/images/start-qemu.sh')
 
     child = pexpect.spawn(qemu_start, ['serial-only'],