Add regression test for libdir reset.

0.54
Jussi Pakkanen 5 years ago committed by Nirbheek Chauhan
parent 62b5c456ee
commit 03f6d131f1
  1. 11
      run_unittests.py
  2. 2
      test cases/unit/75 subdir libdir/meson.build
  3. 1
      test cases/unit/75 subdir libdir/subprojects/flub/meson.build

@ -6615,6 +6615,17 @@ class LinuxCrossArmTests(BasePlatformTests):
return return
self.assertTrue(False, 'Option libdir not in introspect data.') self.assertTrue(False, 'Option libdir not in introspect data.')
def test_cross_libdir_subproject(self):
# Guard against a regression where calling "subproject"
# would reset the value of libdir to its default value.
testdir = os.path.join(self.unit_test_dir, '75 subdir libdir')
self.init(testdir, extra_args=['--libdir=fuf'])
for i in self.introspect('--buildoptions'):
if i['name'] == 'libdir':
self.assertEqual(i['value'], 'fuf')
return
self.assertTrue(False, 'Libdir specified on command line gets reset.')
def test_std_remains(self): def test_std_remains(self):
# C_std defined in project options must be in effect also when cross compiling. # C_std defined in project options must be in effect also when cross compiling.
testdir = os.path.join(self.unit_test_dir, '51 noncross options') testdir = os.path.join(self.unit_test_dir, '51 noncross options')

@ -0,0 +1,2 @@
project('toplevel', 'c')
subproject('flub')
Loading…
Cancel
Save