mconf: Fix meson configure crash (fixes #5909)

pull/5924/head
Daniel Mensinger 5 years ago committed by Jussi Pakkanen
parent ad368cfc07
commit 47bdea5040
  1. 4
      mesonbuild/mconf.py
  2. 4
      run_unittests.py

@ -181,7 +181,7 @@ class Conf:
core_options = {k: o for k, o in self.coredata.builtins.items() if k in core_option_names}
self.print_options('Core options', core_options)
if self.build.environment.is_cross_build():
if self.default_values_only or self.build.environment.is_cross_build():
self.print_options('Core options (for host machine)', self.coredata.builtins_per_machine.host)
self.print_options(
'Core options (for build machine)',
@ -190,7 +190,7 @@ class Conf:
self.print_options('Core options', self.coredata.builtins_per_machine.host)
self.print_options('Backend options', self.coredata.backend_options)
self.print_options('Base options', self.coredata.base_options)
if self.build.environment.is_cross_build():
if self.default_values_only or self.build.environment.is_cross_build():
self.print_options('Compiler options (for host machine)', self.coredata.compiler_options.host)
self.print_options(
'Compiler options (for build machine)',

@ -3624,6 +3624,10 @@ recommended as it is not supported on some platforms''')
self.maxDiff = None
self.assertListEqual(res_nb, res_wb)
def test_meson_configure_from_source_does_not_crash(self):
testdir = os.path.join(self.unit_test_dir, '59 introspect buildoptions')
self._run(self.mconf_command + [testdir])
def test_introspect_json_dump(self):
testdir = os.path.join(self.unit_test_dir, '57 introspection')
self.init(testdir)

Loading…
Cancel
Save