]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: Show an error for conflicting graphics options
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 26 Aug 2020 07:57:50 +0000 (08:57 +0100)
committerSteve Sakoman <steve@sakoman.com>
Sat, 29 Aug 2020 17:18:47 +0000 (07:18 -1000)
The autobuilder managed to pass the nographic option with "sdl gl" due
to a problem elsewhere. It would have been useful for runqemu to have
errored rather than passing conflicting options to qemu. Add an
error for this invalid usecase.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 377a6ffbcba0d3c5ede470c989756c4d1636873f)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
scripts/runqemu

index 398f0a0910a44972896d4f55a0f0f1ab215cd5a3..b24ac1c8042d68d5bd76efafb71115387d0970e0 100755 (executable)
@@ -436,6 +436,10 @@ class BaseConfig(object):
             if arg in self.fstypes + self.vmtypes + self.wictypes:
                 self.check_arg_fstype(arg)
             elif arg == 'nographic':
+                if ('sdl' in sys.argv):
+                    raise RunQemuError('Option nographic makes no sense alongside the sdl option.' % (arg))
+                if ('gtk' in sys.argv):
+                    raise RunQemuError('Option nographic makes no sense alongside the gtk option.' % (arg))
                 self.qemu_opt_script += ' -nographic'
                 self.kernel_cmdline_script += ' console=ttyS0'
             elif arg == 'sdl':