|
|
@ -634,7 +634,7 @@ class AllPlatformTests(BasePlatformTests): |
|
|
|
self.run_tests() |
|
|
|
self.run_tests() |
|
|
|
|
|
|
|
|
|
|
|
def test_implicit_forcefallback(self): |
|
|
|
def test_implicit_forcefallback(self): |
|
|
|
testdir = os.path.join(self.unit_test_dir, '95 implicit force fallback') |
|
|
|
testdir = os.path.join(self.unit_test_dir, '96 implicit force fallback') |
|
|
|
with self.assertRaises(subprocess.CalledProcessError): |
|
|
|
with self.assertRaises(subprocess.CalledProcessError): |
|
|
|
self.init(testdir) |
|
|
|
self.init(testdir) |
|
|
|
self.init(testdir, extra_args=['--wrap-mode=forcefallback']) |
|
|
|
self.init(testdir, extra_args=['--wrap-mode=forcefallback']) |
|
|
@ -1958,7 +1958,7 @@ class AllPlatformTests(BasePlatformTests): |
|
|
|
check_pcfile('libvartest2.pc', relocatable=False) |
|
|
|
check_pcfile('libvartest2.pc', relocatable=False) |
|
|
|
|
|
|
|
|
|
|
|
self.wipe() |
|
|
|
self.wipe() |
|
|
|
testdir_abs = os.path.join(self.unit_test_dir, '105 pkgconfig relocatable with absolute path') |
|
|
|
testdir_abs = os.path.join(self.unit_test_dir, '106 pkgconfig relocatable with absolute path') |
|
|
|
self.init(testdir_abs) |
|
|
|
self.init(testdir_abs) |
|
|
|
|
|
|
|
|
|
|
|
check_pcfile('libsimple.pc', relocatable=True, levels=3) |
|
|
|
check_pcfile('libsimple.pc', relocatable=True, levels=3) |
|
|
@ -2369,7 +2369,7 @@ class AllPlatformTests(BasePlatformTests): |
|
|
|
self.assertIn(msg, out) |
|
|
|
self.assertIn(msg, out) |
|
|
|
|
|
|
|
|
|
|
|
def test_mixed_language_linker_check(self): |
|
|
|
def test_mixed_language_linker_check(self): |
|
|
|
testdir = os.path.join(self.unit_test_dir, '96 compiler.links file arg') |
|
|
|
testdir = os.path.join(self.unit_test_dir, '97 compiler.links file arg') |
|
|
|
self.init(testdir) |
|
|
|
self.init(testdir) |
|
|
|
cmds = self.get_meson_log_compiler_checks() |
|
|
|
cmds = self.get_meson_log_compiler_checks() |
|
|
|
self.assertEqual(len(cmds), 5) |
|
|
|
self.assertEqual(len(cmds), 5) |
|
|
@ -4206,7 +4206,7 @@ class AllPlatformTests(BasePlatformTests): |
|
|
|
self.init(srcdir, extra_args=['-Dbuild.b_lto=true']) |
|
|
|
self.init(srcdir, extra_args=['-Dbuild.b_lto=true']) |
|
|
|
|
|
|
|
|
|
|
|
def test_install_skip_subprojects(self): |
|
|
|
def test_install_skip_subprojects(self): |
|
|
|
testdir = os.path.join(self.unit_test_dir, '91 install skip subprojects') |
|
|
|
testdir = os.path.join(self.unit_test_dir, '92 install skip subprojects') |
|
|
|
self.init(testdir) |
|
|
|
self.init(testdir) |
|
|
|
self.build() |
|
|
|
self.build() |
|
|
|
|
|
|
|
|
|
|
@ -4253,7 +4253,7 @@ class AllPlatformTests(BasePlatformTests): |
|
|
|
check_installed_files(['--skip-subprojects', 'another'], all_expected) |
|
|
|
check_installed_files(['--skip-subprojects', 'another'], all_expected) |
|
|
|
|
|
|
|
|
|
|
|
def test_adding_subproject_to_configure_project(self) -> None: |
|
|
|
def test_adding_subproject_to_configure_project(self) -> None: |
|
|
|
srcdir = os.path.join(self.unit_test_dir, '92 new subproject in configured project') |
|
|
|
srcdir = os.path.join(self.unit_test_dir, '93 new subproject in configured project') |
|
|
|
self.init(srcdir) |
|
|
|
self.init(srcdir) |
|
|
|
self.build() |
|
|
|
self.build() |
|
|
|
self.setconf('-Duse-sub=true') |
|
|
|
self.setconf('-Duse-sub=true') |
|
|
@ -4303,7 +4303,7 @@ class AllPlatformTests(BasePlatformTests): |
|
|
|
if not shutil.which('clang-format'): |
|
|
|
if not shutil.which('clang-format'): |
|
|
|
raise SkipTest('clang-format not found') |
|
|
|
raise SkipTest('clang-format not found') |
|
|
|
|
|
|
|
|
|
|
|
testdir = os.path.join(self.unit_test_dir, '93 clangformat') |
|
|
|
testdir = os.path.join(self.unit_test_dir, '94 clangformat') |
|
|
|
newdir = os.path.join(self.builddir, 'testdir') |
|
|
|
newdir = os.path.join(self.builddir, 'testdir') |
|
|
|
shutil.copytree(testdir, newdir) |
|
|
|
shutil.copytree(testdir, newdir) |
|
|
|
self.new_builddir() |
|
|
|
self.new_builddir() |
|
|
@ -4328,7 +4328,7 @@ class AllPlatformTests(BasePlatformTests): |
|
|
|
self.build('clang-format-check') |
|
|
|
self.build('clang-format-check') |
|
|
|
|
|
|
|
|
|
|
|
def test_custom_target_implicit_include(self): |
|
|
|
def test_custom_target_implicit_include(self): |
|
|
|
testdir = os.path.join(self.unit_test_dir, '94 custominc') |
|
|
|
testdir = os.path.join(self.unit_test_dir, '95 custominc') |
|
|
|
self.init(testdir) |
|
|
|
self.init(testdir) |
|
|
|
self.build() |
|
|
|
self.build() |
|
|
|
compdb = self.get_compdb() |
|
|
|
compdb = self.get_compdb() |
|
|
@ -4368,7 +4368,7 @@ class AllPlatformTests(BasePlatformTests): |
|
|
|
self.assertEqual(sorted(link_args), sorted(['-flto'])) |
|
|
|
self.assertEqual(sorted(link_args), sorted(['-flto'])) |
|
|
|
|
|
|
|
|
|
|
|
def test_install_tag(self) -> None: |
|
|
|
def test_install_tag(self) -> None: |
|
|
|
testdir = os.path.join(self.unit_test_dir, '98 install all targets') |
|
|
|
testdir = os.path.join(self.unit_test_dir, '99 install all targets') |
|
|
|
self.init(testdir) |
|
|
|
self.init(testdir) |
|
|
|
self.build() |
|
|
|
self.build() |
|
|
|
|
|
|
|
|
|
|
@ -4539,7 +4539,7 @@ class AllPlatformTests(BasePlatformTests): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_introspect_install_plan(self): |
|
|
|
def test_introspect_install_plan(self): |
|
|
|
testdir = os.path.join(self.unit_test_dir, '98 install all targets') |
|
|
|
testdir = os.path.join(self.unit_test_dir, '99 install all targets') |
|
|
|
introfile = os.path.join(self.builddir, 'meson-info', 'intro-install_plan.json') |
|
|
|
introfile = os.path.join(self.builddir, 'meson-info', 'intro-install_plan.json') |
|
|
|
self.init(testdir) |
|
|
|
self.init(testdir) |
|
|
|
self.assertPathExists(introfile) |
|
|
|
self.assertPathExists(introfile) |
|
|
@ -4791,7 +4791,7 @@ class AllPlatformTests(BasePlatformTests): |
|
|
|
}} |
|
|
|
}} |
|
|
|
''') |
|
|
|
''') |
|
|
|
|
|
|
|
|
|
|
|
testdir = os.path.join(self.unit_test_dir, '101 rlib linkage') |
|
|
|
testdir = os.path.join(self.unit_test_dir, '102 rlib linkage') |
|
|
|
gen_file = os.path.join(testdir, 'lib.rs') |
|
|
|
gen_file = os.path.join(testdir, 'lib.rs') |
|
|
|
with open(gen_file, 'w', encoding='utf-8') as f: |
|
|
|
with open(gen_file, 'w', encoding='utf-8') as f: |
|
|
|
f.write(template.format(0)) |
|
|
|
f.write(template.format(0)) |
|
|
@ -4839,7 +4839,7 @@ class AllPlatformTests(BasePlatformTests): |
|
|
|
return |
|
|
|
return |
|
|
|
|
|
|
|
|
|
|
|
def test_custom_target_name(self): |
|
|
|
def test_custom_target_name(self): |
|
|
|
testdir = os.path.join(self.unit_test_dir, '99 custom target name') |
|
|
|
testdir = os.path.join(self.unit_test_dir, '100 custom target name') |
|
|
|
self.init(testdir) |
|
|
|
self.init(testdir) |
|
|
|
out = self.build() |
|
|
|
out = self.build() |
|
|
|
if self.backend is Backend.ninja: |
|
|
|
if self.backend is Backend.ninja: |
|
|
|