summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
Diffstat (limited to 'unittests')
-rw-r--r--unittests/allplatformstests.py42
-rw-r--r--unittests/linuxliketests.py18
-rw-r--r--unittests/machinefiletests.py2
-rw-r--r--unittests/platformagnostictests.py20
-rw-r--r--unittests/rewritetests.py4
-rw-r--r--unittests/windowstests.py2
6 files changed, 44 insertions, 44 deletions
diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py
index c006961ad..535e479a6 100644
--- a/unittests/allplatformstests.py
+++ b/unittests/allplatformstests.py
@@ -529,7 +529,7 @@ class AllPlatformTests(BasePlatformTests):
'''
if not shutil.which('xmllint'):
raise SkipTest('xmllint not installed')
- testdir = os.path.join(self.unit_test_dir, '111 replace unencodable xml chars')
+ testdir = os.path.join(self.unit_test_dir, '112 replace unencodable xml chars')
self.init(testdir)
tests_command_output = self.run_tests()
junit_xml_logs = Path(self.logdir, 'testlog.junit.xml')
@@ -690,7 +690,7 @@ class AllPlatformTests(BasePlatformTests):
self.run_tests()
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):
self.init(testdir)
self.init(testdir, extra_args=['--wrap-mode=forcefallback'])
@@ -1442,7 +1442,7 @@ class AllPlatformTests(BasePlatformTests):
Test that conflicts between -D for builtin options and the corresponding
long option are detected without false positives or negatives.
'''
- testdir = os.path.join(self.unit_test_dir, '128 long opt vs D')
+ testdir = os.path.join(self.unit_test_dir, '130 long opt vs D')
for opt in ['-Dsysconfdir=/etc', '-Dsysconfdir2=/etc']:
exception_raised = False
@@ -2188,7 +2188,7 @@ class AllPlatformTests(BasePlatformTests):
check_pcfile('libvartest2.pc', relocatable=False)
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)
check_pcfile('libsimple.pc', relocatable=True, levels=3)
@@ -2270,7 +2270,7 @@ class AllPlatformTests(BasePlatformTests):
self.assertDictEqual(original, expected)
def test_executable_names(self):
- testdir = os.path.join(self.unit_test_dir, '121 executable suffix')
+ testdir = os.path.join(self.unit_test_dir, '122 executable suffix')
self.init(testdir)
self.build()
exe1 = os.path.join(self.builddir, 'foo' + exe_suffix)
@@ -2361,7 +2361,7 @@ class AllPlatformTests(BasePlatformTests):
def test_options_listed_in_build_options(self) -> None:
"""Detect when changed options become listed in build options."""
- testdir = os.path.join(self.unit_test_dir, '113 list build options')
+ testdir = os.path.join(self.unit_test_dir, '114 list build options')
out = self.init(testdir)
for line in out.splitlines():
@@ -2598,7 +2598,7 @@ class AllPlatformTests(BasePlatformTests):
self.assertIn(msg, out)
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)
cmds = self.get_meson_log_compiler_checks()
self.assertEqual(len(cmds), 5)
@@ -4443,7 +4443,7 @@ class AllPlatformTests(BasePlatformTests):
self.init(srcdir, extra_args=['-Dbuild.b_lto=true'])
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.build()
@@ -4490,7 +4490,7 @@ class AllPlatformTests(BasePlatformTests):
check_installed_files(['--skip-subprojects', 'another'], all_expected)
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.build()
self.setconf('-Duse-sub=true')
@@ -4544,7 +4544,7 @@ class AllPlatformTests(BasePlatformTests):
if not shutil.which('clang-format'):
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')
shutil.copytree(testdir, newdir)
self.new_builddir()
@@ -4569,7 +4569,7 @@ class AllPlatformTests(BasePlatformTests):
self.build('clang-format-check')
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.build()
compdb = self.get_compdb()
@@ -4615,7 +4615,7 @@ class AllPlatformTests(BasePlatformTests):
# self.assertEqual(sorted(link_args), sorted(['-flto']))
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.build()
@@ -4786,7 +4786,7 @@ class AllPlatformTests(BasePlatformTests):
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')
self.init(testdir)
self.assertPathExists(introfile)
@@ -5122,7 +5122,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')
with open(gen_file, 'w', encoding='utf-8') as f:
f.write(template.format(0))
@@ -5170,7 +5170,7 @@ class AllPlatformTests(BasePlatformTests):
return
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)
out = self.build()
if self.backend is Backend.ninja:
@@ -5178,7 +5178,7 @@ class AllPlatformTests(BasePlatformTests):
self.assertIn('Generating subdir/file.txt with a custom command', out)
def test_symlinked_subproject(self):
- testdir = os.path.join(self.unit_test_dir, '107 subproject symlink')
+ testdir = os.path.join(self.unit_test_dir, '108 subproject symlink')
subproject_dir = os.path.join(testdir, 'subprojects')
subproject = os.path.join(testdir, 'symlinked_subproject')
symlinked_subproject = os.path.join(testdir, 'subprojects', 'symlinked_subproject')
@@ -5194,7 +5194,7 @@ class AllPlatformTests(BasePlatformTests):
self.build()
def test_configure_same_noop(self):
- testdir = os.path.join(self.unit_test_dir, '109 configure same noop')
+ testdir = os.path.join(self.unit_test_dir, '110 configure same noop')
args = [
'-Dstring=val',
'-Dboolean=true',
@@ -5232,7 +5232,7 @@ class AllPlatformTests(BasePlatformTests):
def __test_multi_stds(self, test_c: bool = True, test_objc: bool = False) -> None:
assert test_c or test_objc, 'must test something'
- testdir = os.path.join(self.unit_test_dir, '115 c cpp stds')
+ testdir = os.path.join(self.unit_test_dir, '116 c cpp stds')
self.init(testdir, extra_args=[f'-Dwith-c={str(test_c).lower()}',
f'-Dwith-objc={str(test_objc).lower()}'])
# Invalid values should fail whatever compiler we have
@@ -5291,7 +5291,7 @@ class AllPlatformTests(BasePlatformTests):
self.__test_multi_stds(test_objc=True)
def test_slice(self):
- testdir = os.path.join(self.unit_test_dir, '126 test slice')
+ testdir = os.path.join(self.unit_test_dir, '128 test slice')
self.init(testdir)
self.build()
@@ -5329,7 +5329,7 @@ class AllPlatformTests(BasePlatformTests):
self.assertEqual(cc.linker.get_accepts_rsp(), has_rsp)
def test_nonexisting_bargs(self):
- testdir = os.path.join(self.unit_test_dir, '116 empty project')
+ testdir = os.path.join(self.unit_test_dir, '117 empty project')
args = ['-Db_ndebug=if_release']
self.init(testdir, extra_args=args)
@@ -5339,7 +5339,7 @@ class AllPlatformTests(BasePlatformTests):
self.init(testdir, extra_args=['--wipe'])
def test_interactive_tap(self):
- testdir = os.path.join(self.unit_test_dir, '124 interactive tap')
+ testdir = os.path.join(self.unit_test_dir, '125 interactive tap')
self.init(testdir, extra_args=['--wrap-mode=forcefallback'])
output = self._run(self.mtest_command + ['--interactive'])
self.assertRegex(output, r'Ok:\s*0')
diff --git a/unittests/linuxliketests.py b/unittests/linuxliketests.py
index c25449c98..073f03cfc 100644
--- a/unittests/linuxliketests.py
+++ b/unittests/linuxliketests.py
@@ -1397,7 +1397,7 @@ class LinuxlikeTests(BasePlatformTests):
see: https://github.com/mesonbuild/meson/issues/9000
https://stackoverflow.com/questions/48532868/gcc-library-option-with-a-colon-llibevent-a
'''
- testdir = os.path.join(self.unit_test_dir, '97 link full name','libtestprovider')
+ testdir = os.path.join(self.unit_test_dir, '98 link full name','libtestprovider')
oldprefix = self.prefix
# install into installdir without using DESTDIR
installdir = self.installdir
@@ -1410,7 +1410,7 @@ class LinuxlikeTests(BasePlatformTests):
self.new_builddir()
env = {'LIBRARY_PATH': os.path.join(installdir, self.libdir),
'PKG_CONFIG_PATH': _prepend_pkg_config_path(os.path.join(installdir, self.libdir, 'pkgconfig'))}
- testdir = os.path.join(self.unit_test_dir, '97 link full name','proguser')
+ testdir = os.path.join(self.unit_test_dir, '98 link full name','proguser')
self.init(testdir,override_envvars=env)
# test for link with full path
@@ -1816,7 +1816,7 @@ class LinuxlikeTests(BasePlatformTests):
@skipUnless(is_linux() or is_osx(), 'Test only applicable to Linux and macOS')
def test_install_strip(self):
- testdir = os.path.join(self.unit_test_dir, '103 strip')
+ testdir = os.path.join(self.unit_test_dir, '104 strip')
self.init(testdir)
self.build()
@@ -1863,7 +1863,7 @@ class LinuxlikeTests(BasePlatformTests):
self.assertFalse(cpp.compiler_args([f'-isystem{symlink}' for symlink in default_symlinks]).to_native())
def test_freezing(self):
- testdir = os.path.join(self.unit_test_dir, '110 freeze')
+ testdir = os.path.join(self.unit_test_dir, '111 freeze')
self.init(testdir)
self.build()
with self.assertRaises(subprocess.CalledProcessError) as e:
@@ -1872,7 +1872,7 @@ class LinuxlikeTests(BasePlatformTests):
@skipUnless(is_linux(), "Ninja file differs on different platforms")
def test_complex_link_cases(self):
- testdir = os.path.join(self.unit_test_dir, '114 complex link cases')
+ testdir = os.path.join(self.unit_test_dir, '115 complex link cases')
self.init(testdir)
self.build()
with open(os.path.join(self.builddir, 'build.ninja'), encoding='utf-8') as f:
@@ -1893,11 +1893,11 @@ class LinuxlikeTests(BasePlatformTests):
self.assertIn('build t13-e1: c_LINKER t13-e1.p/main.c.o | libt12-s1.a libt13-s3.a\n', content)
def test_top_options_in_sp(self):
- testdir = os.path.join(self.unit_test_dir, '125 pkgsubproj')
+ testdir = os.path.join(self.unit_test_dir, '127 pkgsubproj')
self.init(testdir)
def test_unreadable_dir_in_declare_dep(self):
- testdir = os.path.join(self.unit_test_dir, '125 declare_dep var')
+ testdir = os.path.join(self.unit_test_dir, '126 declare_dep var')
tmpdir = Path(tempfile.mkdtemp())
self.addCleanup(windows_proof_rmtree, tmpdir)
declaredepdir = tmpdir / 'test'
@@ -1919,7 +1919,7 @@ class LinuxlikeTests(BasePlatformTests):
if self.backend is not Backend.ninja:
raise SkipTest(f'{self.backend.name!r} backend can\'t install files')
- testdir = os.path.join(self.unit_test_dir, '122 persp options')
+ testdir = os.path.join(self.unit_test_dir, '123 persp options')
with self.subTest('init'):
self.init(testdir, extra_args='-Doptimization=1')
@@ -1972,7 +1972,7 @@ class LinuxlikeTests(BasePlatformTests):
self.check_has_flag(compdb, sub2src, '-O2')
def test_sanitizers(self):
- testdir = os.path.join(self.unit_test_dir, '127 sanitizers')
+ testdir = os.path.join(self.unit_test_dir, '129 sanitizers')
with self.subTest('no b_sanitize value'):
try:
diff --git a/unittests/machinefiletests.py b/unittests/machinefiletests.py
index 7f88a54bf..e4687eb60 100644
--- a/unittests/machinefiletests.py
+++ b/unittests/machinefiletests.py
@@ -388,7 +388,7 @@ class NativeFileTests(BasePlatformTests):
def test_java_classpath(self):
if self.backend is not Backend.ninja:
raise SkipTest('Jar is only supported with Ninja')
- testdir = os.path.join(self.unit_test_dir, '112 classpath')
+ testdir = os.path.join(self.unit_test_dir, '113 classpath')
self.init(testdir)
self.build()
one_build_path = get_classpath(os.path.join(self.builddir, 'one.jar'))
diff --git a/unittests/platformagnostictests.py b/unittests/platformagnostictests.py
index 9c5e2bd2c..b0e4350f9 100644
--- a/unittests/platformagnostictests.py
+++ b/unittests/platformagnostictests.py
@@ -33,7 +33,7 @@ class PlatformAgnosticTests(BasePlatformTests):
Tests that find_program() with a relative path does not find the program
in current workdir.
'''
- testdir = os.path.join(self.unit_test_dir, '100 relative find program')
+ testdir = os.path.join(self.unit_test_dir, '101 relative find program')
self.init(testdir, workdir=testdir)
def test_invalid_option_names(self):
@@ -92,11 +92,11 @@ class PlatformAgnosticTests(BasePlatformTests):
interp.process, fname)
def test_python_dependency_without_pkgconfig(self):
- testdir = os.path.join(self.unit_test_dir, '102 python without pkgconfig')
+ testdir = os.path.join(self.unit_test_dir, '103 python without pkgconfig')
self.init(testdir, override_envvars={'PKG_CONFIG': 'notfound'})
def test_vala_target_with_internal_glib(self):
- testdir = os.path.join(self.unit_test_dir, '129 vala internal glib')
+ testdir = os.path.join(self.unit_test_dir, '131 vala internal glib')
for run in [{ 'version': '2.84.4', 'expected': '2.84'}, { 'version': '2.85.2', 'expected': '2.84' }]:
self.new_builddir()
self.init(testdir, extra_args=[f'-Dglib-version={run["version"]}'])
@@ -113,7 +113,7 @@ class PlatformAgnosticTests(BasePlatformTests):
self.skipTest('Current backend does not produce introspection data')
def test_debug_function_outputs_to_meson_log(self):
- testdir = os.path.join(self.unit_test_dir, '104 debug function')
+ testdir = os.path.join(self.unit_test_dir, '105 debug function')
log_msg = 'This is an example debug output, should only end up in debug log'
output = self.init(testdir)
@@ -125,7 +125,7 @@ class PlatformAgnosticTests(BasePlatformTests):
self.assertIn(log_msg, mesonlog)
def test_new_subproject_reconfigure(self):
- testdir = os.path.join(self.unit_test_dir, '108 new subproject on reconfigure')
+ testdir = os.path.join(self.unit_test_dir, '109 new subproject on reconfigure')
self.init(testdir)
self.build()
@@ -288,7 +288,7 @@ class PlatformAgnosticTests(BasePlatformTests):
thing to do as new features are added, but keeping track of them is
good.
'''
- testdir = os.path.join(self.unit_test_dir, '116 empty project')
+ testdir = os.path.join(self.unit_test_dir, '117 empty project')
self.init(testdir)
self._run(self.meson_command + ['--internal', 'regenerate', '--profile-self', testdir, self.builddir])
@@ -303,7 +303,7 @@ class PlatformAgnosticTests(BasePlatformTests):
def test_meson_package_cache_dir(self):
# Copy testdir into temporary directory to not pollute meson source tree.
- testdir = os.path.join(self.unit_test_dir, '118 meson package cache dir')
+ testdir = os.path.join(self.unit_test_dir, '119 meson package cache dir')
srcdir = os.path.join(self.builddir, 'srctree')
shutil.copytree(testdir, srcdir)
builddir = os.path.join(srcdir, '_build')
@@ -312,7 +312,7 @@ class PlatformAgnosticTests(BasePlatformTests):
def test_cmake_openssl_not_found_bug(self):
"""Issue #12098"""
- testdir = os.path.join(self.unit_test_dir, '119 openssl cmake bug')
+ testdir = os.path.join(self.unit_test_dir, '120 openssl cmake bug')
self.meson_native_files.append(os.path.join(testdir, 'nativefile.ini'))
out = self.init(testdir, allow_fail=True)
self.assertNotIn('Unhandled python exception', out)
@@ -422,7 +422,7 @@ class PlatformAgnosticTests(BasePlatformTests):
self.assertIn(f'Did you mean to run meson from the directory: "{testdir}"?', out)
def test_reconfigure_base_options(self):
- testdir = os.path.join(self.unit_test_dir, '123 reconfigure base options')
+ testdir = os.path.join(self.unit_test_dir, '124 reconfigure base options')
out = self.init(testdir, extra_args=['-Db_ndebug=true'])
self.assertIn('\nMessage: b_ndebug: true\n', out)
self.assertIn('\nMessage: c_std: c89\n', out)
@@ -548,7 +548,7 @@ class PlatformAgnosticTests(BasePlatformTests):
self.assertEqual(self.getconf('subproject:new_option'), True)
def test_mtest_rebuild_deps(self):
- testdir = os.path.join(self.unit_test_dir, '106 underspecified mtest')
+ testdir = os.path.join(self.unit_test_dir, '107 underspecified mtest')
self.init(testdir)
with self.assertRaises(subprocess.CalledProcessError):
diff --git a/unittests/rewritetests.py b/unittests/rewritetests.py
index 767c29187..11cac1939 100644
--- a/unittests/rewritetests.py
+++ b/unittests/rewritetests.py
@@ -429,7 +429,7 @@ class RewriterTests(BasePlatformTests):
self.assertEqualIgnoreOrder(out, expected)
def test_tricky_dataflow(self):
- self.prime('7 tricky dataflow')
+ self.prime('8 tricky dataflow')
out = self.rewrite(self.builddir, os.path.join(self.builddir, 'addSrc.json'))
expected = {
'target': {
@@ -449,7 +449,7 @@ class RewriterTests(BasePlatformTests):
self.assertEqualIgnoreOrder(out, expected)
def test_raw_printer_is_idempotent(self):
- test_path = Path(self.unit_test_dir, '120 rewrite')
+ test_path = Path(self.unit_test_dir, '121 rewrite')
meson_build_file = test_path / 'meson.build'
# original_contents = meson_build_file.read_bytes()
original_contents = meson_build_file.read_text(encoding='utf-8')
diff --git a/unittests/windowstests.py b/unittests/windowstests.py
index 7fa4ab286..9506a75ef 100644
--- a/unittests/windowstests.py
+++ b/unittests/windowstests.py
@@ -185,7 +185,7 @@ class WindowsTests(BasePlatformTests):
if self.backend is not Backend.ninja:
raise SkipTest('Test only applies when using the Ninja backend')
- testdir = os.path.join(self.unit_test_dir, '117 genvslite')
+ testdir = os.path.join(self.unit_test_dir, '118 genvslite')
env = get_fake_env(testdir, self.builddir, self.prefix)
cc = detect_c_compiler(env, MachineChoice.HOST)