diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-10-07 18:22:06 +0200 |
|---|---|---|
| committer | Jussi Pakkanen <jussi.pakkanen@mailbox.org> | 2025-10-29 18:59:30 +0200 |
| commit | 795e7431ffafa0cc1257d64c5fdd0f2c3cb6d841 (patch) | |
| tree | 40ff7c80d4ae38cb1b144824a284e0115368e7c0 /unittests | |
| parent | 1614401329f11d3763a56ed5ce207aba511a6a9d (diff) | |
| download | meson-795e7431ffafa0cc1257d64c5fdd0f2c3cb6d841.tar.gz | |
environment: move tool detection functions to a new module
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'unittests')
| -rw-r--r-- | unittests/allplatformstests.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py index 21cdaa8be..cf3427aeb 100644 --- a/unittests/allplatformstests.py +++ b/unittests/allplatformstests.py @@ -2497,7 +2497,7 @@ class AllPlatformTests(BasePlatformTests): self.assertIn('ERROR: compiler.has_header_symbol got unknown keyword arguments "prefixxx"', cm.exception.output) def test_templates(self): - ninja = mesonbuild.environment.detect_ninja() + ninja = mesonbuild.tooldetect.detect_ninja() if ninja is None: raise SkipTest('This test currently requires ninja. Fix this once "meson build" works.') @@ -4290,14 +4290,14 @@ class AllPlatformTests(BasePlatformTests): def test_coverage(self): if mesonbuild.envconfig.detect_msys2_arch(): raise SkipTest('Skipped due to problems with coverage on MSYS2') - gcovr_exe, gcovr_new_rootdir = mesonbuild.environment.detect_gcovr() + gcovr_exe, gcovr_new_rootdir = mesonbuild.tooldetect.detect_gcovr() if not gcovr_exe: raise SkipTest('gcovr not found, or too old') testdir = os.path.join(self.common_test_dir, '1 trivial') env = get_fake_env(testdir, self.builddir, self.prefix) cc = detect_c_compiler(env, MachineChoice.HOST) if cc.get_id() == 'clang': - if not mesonbuild.environment.detect_llvm_cov(): + if not mesonbuild.tooldetect.detect_llvm_cov(): raise SkipTest('llvm-cov not found') if cc.get_id() == 'msvc': raise SkipTest('Test only applies to non-MSVC compilers') @@ -4310,14 +4310,14 @@ class AllPlatformTests(BasePlatformTests): def test_coverage_complex(self): if mesonbuild.envconfig.detect_msys2_arch(): raise SkipTest('Skipped due to problems with coverage on MSYS2') - gcovr_exe, gcovr_new_rootdir = mesonbuild.environment.detect_gcovr() + gcovr_exe, gcovr_new_rootdir = mesonbuild.tooldetect.detect_gcovr() if not gcovr_exe: raise SkipTest('gcovr not found, or too old') testdir = os.path.join(self.common_test_dir, '105 generatorcustom') env = get_fake_env(testdir, self.builddir, self.prefix) cc = detect_c_compiler(env, MachineChoice.HOST) if cc.get_id() == 'clang': - if not mesonbuild.environment.detect_llvm_cov(): + if not mesonbuild.tooldetect.detect_llvm_cov(): raise SkipTest('llvm-cov not found') if cc.get_id() == 'msvc': raise SkipTest('Test only applies to non-MSVC compilers') @@ -4330,14 +4330,14 @@ class AllPlatformTests(BasePlatformTests): def test_coverage_html(self): if mesonbuild.envconfig.detect_msys2_arch(): raise SkipTest('Skipped due to problems with coverage on MSYS2') - gcovr_exe, gcovr_new_rootdir = mesonbuild.environment.detect_gcovr() + gcovr_exe, gcovr_new_rootdir = mesonbuild.tooldetect.detect_gcovr() if not gcovr_exe: raise SkipTest('gcovr not found, or too old') testdir = os.path.join(self.common_test_dir, '1 trivial') env = get_fake_env(testdir, self.builddir, self.prefix) cc = detect_c_compiler(env, MachineChoice.HOST) if cc.get_id() == 'clang': - if not mesonbuild.environment.detect_llvm_cov(): + if not mesonbuild.tooldetect.detect_llvm_cov(): raise SkipTest('llvm-cov not found') if cc.get_id() == 'msvc': raise SkipTest('Test only applies to non-MSVC compilers') @@ -4350,14 +4350,14 @@ class AllPlatformTests(BasePlatformTests): def test_coverage_text(self): if mesonbuild.envconfig.detect_msys2_arch(): raise SkipTest('Skipped due to problems with coverage on MSYS2') - gcovr_exe, gcovr_new_rootdir = mesonbuild.environment.detect_gcovr() + gcovr_exe, gcovr_new_rootdir = mesonbuild.tooldetect.detect_gcovr() if not gcovr_exe: raise SkipTest('gcovr not found, or too old') testdir = os.path.join(self.common_test_dir, '1 trivial') env = get_fake_env(testdir, self.builddir, self.prefix) cc = detect_c_compiler(env, MachineChoice.HOST) if cc.get_id() == 'clang': - if not mesonbuild.environment.detect_llvm_cov(): + if not mesonbuild.tooldetect.detect_llvm_cov(): raise SkipTest('llvm-cov not found') if cc.get_id() == 'msvc': raise SkipTest('Test only applies to non-MSVC compilers') @@ -4370,14 +4370,14 @@ class AllPlatformTests(BasePlatformTests): def test_coverage_xml(self): if mesonbuild.envconfig.detect_msys2_arch(): raise SkipTest('Skipped due to problems with coverage on MSYS2') - gcovr_exe, gcovr_new_rootdir = mesonbuild.environment.detect_gcovr() + gcovr_exe, gcovr_new_rootdir = mesonbuild.tooldetect.detect_gcovr() if not gcovr_exe: raise SkipTest('gcovr not found, or too old') testdir = os.path.join(self.common_test_dir, '1 trivial') env = get_fake_env(testdir, self.builddir, self.prefix) cc = detect_c_compiler(env, MachineChoice.HOST) if cc.get_id() == 'clang': - if not mesonbuild.environment.detect_llvm_cov(): + if not mesonbuild.tooldetect.detect_llvm_cov(): raise SkipTest('llvm-cov not found') if cc.get_id() == 'msvc': raise SkipTest('Test only applies to non-MSVC compilers') @@ -4390,14 +4390,14 @@ class AllPlatformTests(BasePlatformTests): def test_coverage_escaping(self): if mesonbuild.envconfig.detect_msys2_arch(): raise SkipTest('Skipped due to problems with coverage on MSYS2') - gcovr_exe, gcovr_new_rootdir = mesonbuild.environment.detect_gcovr() + gcovr_exe, gcovr_new_rootdir = mesonbuild.tooldetect.detect_gcovr() if not gcovr_exe: raise SkipTest('gcovr not found, or too old') testdir = os.path.join(self.common_test_dir, '243 escape++') env = get_fake_env(testdir, self.builddir, self.prefix) cc = detect_c_compiler(env, MachineChoice.HOST) if cc.get_id() == 'clang': - if not mesonbuild.environment.detect_llvm_cov(): + if not mesonbuild.tooldetect.detect_llvm_cov(): raise SkipTest('llvm-cov not found') if cc.get_id() == 'msvc': raise SkipTest('Test only applies to non-MSVC compilers') |
