Condense test directories for rc1.

pull/11590/head
Jussi Pakkanen 2 years ago
parent c4cc14c27c
commit 78d8924d43
  1. 0
      test cases/unit/100 custom target name/file.txt.in
  2. 0
      test cases/unit/100 custom target name/meson.build
  3. 0
      test cases/unit/100 custom target name/subdir/meson.build
  4. 0
      test cases/unit/101 relative find program/foo.py
  5. 0
      test cases/unit/101 relative find program/meson.build
  6. 0
      test cases/unit/101 relative find program/subdir/meson.build
  7. 0
      test cases/unit/102 rlib linkage/lib2.rs
  8. 0
      test cases/unit/102 rlib linkage/main.rs
  9. 0
      test cases/unit/102 rlib linkage/meson.build
  10. 0
      test cases/unit/103 python without pkgconfig/meson.build
  11. 0
      test cases/unit/104 strip/lib.c
  12. 0
      test cases/unit/104 strip/meson.build
  13. 0
      test cases/unit/105 debug function/meson.build
  14. 0
      test cases/unit/106 pkgconfig relocatable with absolute path/meson.build
  15. 0
      test cases/unit/107 subproject symlink/cp.py
  16. 0
      test cases/unit/107 subproject symlink/main.c
  17. 0
      test cases/unit/107 subproject symlink/meson.build
  18. 0
      test cases/unit/107 subproject symlink/symlinked_subproject/datadir/datafile
  19. 0
      test cases/unit/107 subproject symlink/symlinked_subproject/datadir/meson.build
  20. 0
      test cases/unit/107 subproject symlink/symlinked_subproject/meson.build
  21. 0
      test cases/unit/107 subproject symlink/symlinked_subproject/src.c
  22. 0
      test cases/unit/108 new subproject on reconfigure/meson.build
  23. 0
      test cases/unit/108 new subproject on reconfigure/meson_options.txt
  24. 0
      test cases/unit/108 new subproject on reconfigure/subprojects/foo/foo.c
  25. 0
      test cases/unit/108 new subproject on reconfigure/subprojects/foo/meson.build
  26. 0
      test cases/unit/109 configure same noop/meson.build
  27. 0
      test cases/unit/109 configure same noop/meson_options.txt
  28. 0
      test cases/unit/110 freeze/freeze.c
  29. 0
      test cases/unit/110 freeze/meson.build
  30. 0
      test cases/unit/111 classpath/com/mesonbuild/Simple.java
  31. 0
      test cases/unit/111 classpath/meson.build
  32. 0
      test cases/unit/112 list build options/meson.build
  33. 0
      test cases/unit/112 list build options/meson_options.txt
  34. 0
      test cases/unit/92 install skip subprojects/foo.c
  35. 0
      test cases/unit/92 install skip subprojects/foo.dat
  36. 0
      test cases/unit/92 install skip subprojects/foo.h
  37. 0
      test cases/unit/92 install skip subprojects/foo/foofile
  38. 0
      test cases/unit/92 install skip subprojects/meson.build
  39. 0
      test cases/unit/92 install skip subprojects/subprojects/bar/bar.c
  40. 0
      test cases/unit/92 install skip subprojects/subprojects/bar/bar.dat
  41. 0
      test cases/unit/92 install skip subprojects/subprojects/bar/bar.h
  42. 0
      test cases/unit/92 install skip subprojects/subprojects/bar/bar/barfile
  43. 0
      test cases/unit/92 install skip subprojects/subprojects/bar/meson.build
  44. 0
      test cases/unit/93 new subproject in configured project/meson.build
  45. 0
      test cases/unit/93 new subproject in configured project/meson_options.txt
  46. 0
      test cases/unit/93 new subproject in configured project/subprojects/sub/foo.c
  47. 0
      test cases/unit/93 new subproject in configured project/subprojects/sub/meson.build
  48. 0
      test cases/unit/94 clangformat/.clang-format
  49. 0
      test cases/unit/94 clangformat/.clang-format-ignore
  50. 0
      test cases/unit/94 clangformat/.clang-format-include
  51. 0
      test cases/unit/94 clangformat/meson.build
  52. 0
      test cases/unit/94 clangformat/not-included/badformat.cpp
  53. 0
      test cases/unit/94 clangformat/src/badformat.c
  54. 0
      test cases/unit/94 clangformat/src/badformat.cpp
  55. 0
      test cases/unit/95 custominc/easytogrepfor/genh.py
  56. 0
      test cases/unit/95 custominc/easytogrepfor/meson.build
  57. 0
      test cases/unit/95 custominc/helper.c
  58. 0
      test cases/unit/95 custominc/meson.build
  59. 0
      test cases/unit/95 custominc/prog.c
  60. 0
      test cases/unit/95 custominc/prog2.c
  61. 0
      test cases/unit/96 implicit force fallback/meson.build
  62. 0
      test cases/unit/96 implicit force fallback/subprojects/something/meson.build
  63. 0
      test cases/unit/97 compiler.links file arg/meson.build
  64. 0
      test cases/unit/97 compiler.links file arg/test.c
  65. 0
      test cases/unit/98 link full name/.gitignore
  66. 0
      test cases/unit/98 link full name/libtestprovider/meson.build
  67. 0
      test cases/unit/98 link full name/libtestprovider/provider.c
  68. 0
      test cases/unit/98 link full name/proguser/meson.build
  69. 0
      test cases/unit/98 link full name/proguser/receiver.c
  70. 0
      test cases/unit/99 install all targets/bar-custom.txt
  71. 0
      test cases/unit/99 install all targets/bar-devel.h
  72. 0
      test cases/unit/99 install all targets/bar-notag.txt
  73. 0
      test cases/unit/99 install all targets/custom_files/data.txt
  74. 0
      test cases/unit/99 install all targets/excludes/excluded.txt
  75. 0
      test cases/unit/99 install all targets/excludes/excluded/placeholder.txt
  76. 0
      test cases/unit/99 install all targets/excludes/installed.txt
  77. 0
      test cases/unit/99 install all targets/foo.in
  78. 0
      test cases/unit/99 install all targets/foo1-devel.h
  79. 0
      test cases/unit/99 install all targets/lib.c
  80. 0
      test cases/unit/99 install all targets/main.c
  81. 0
      test cases/unit/99 install all targets/meson.build
  82. 0
      test cases/unit/99 install all targets/script.py
  83. 0
      test cases/unit/99 install all targets/subdir/bar2-devel.h
  84. 0
      test cases/unit/99 install all targets/subdir/foo2.in
  85. 0
      test cases/unit/99 install all targets/subdir/foo3-devel.h
  86. 0
      test cases/unit/99 install all targets/subdir/lib.c
  87. 0
      test cases/unit/99 install all targets/subdir/main.c
  88. 0
      test cases/unit/99 install all targets/subdir/meson.build
  89. 0
      test cases/unit/99 install all targets/subdir/script.py
  90. 28
      unittests/allplatformstests.py
  91. 8
      unittests/linuxliketests.py
  92. 2
      unittests/machinefiletests.py
  93. 8
      unittests/platformagnostictests.py

@ -543,7 +543,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'])
@ -1839,7 +1839,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)
@ -1993,7 +1993,7 @@ class AllPlatformTests(BasePlatformTests):
def test_options_listed_in_build_options(self) -> None: def test_options_listed_in_build_options(self) -> None:
"""Detect when changed options become listed in build options.""" """Detect when changed options become listed in build options."""
testdir = os.path.join(self.unit_test_dir, '110 list build options') testdir = os.path.join(self.unit_test_dir, '112 list build options')
out = self.init(testdir) out = self.init(testdir)
for line in out.splitlines(): for line in out.splitlines():
@ -2229,7 +2229,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)
@ -4002,7 +4002,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()
@ -4048,7 +4048,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')
@ -4098,7 +4098,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()
@ -4123,7 +4123,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()
@ -4163,7 +4163,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()
@ -4331,7 +4331,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)
@ -4542,7 +4542,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') as f: with open(gen_file, 'w') as f:
f.write(template.format(0)) f.write(template.format(0))
@ -4562,7 +4562,7 @@ class AllPlatformTests(BasePlatformTests):
self.assertIn('exit status 39', cm.exception.stdout) self.assertIn('exit status 39', cm.exception.stdout)
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:
@ -4570,7 +4570,7 @@ class AllPlatformTests(BasePlatformTests):
self.assertIn('Generating subdir/file.txt with a custom command', out) self.assertIn('Generating subdir/file.txt with a custom command', out)
def test_symlinked_subproject(self): def test_symlinked_subproject(self):
testdir = os.path.join(self.unit_test_dir, '106 subproject symlink') testdir = os.path.join(self.unit_test_dir, '107 subproject symlink')
subproject_dir = os.path.join(testdir, 'subprojects') subproject_dir = os.path.join(testdir, 'subprojects')
subproject = os.path.join(testdir, 'symlinked_subproject') subproject = os.path.join(testdir, 'symlinked_subproject')
symlinked_subproject = os.path.join(testdir, 'subprojects', 'symlinked_subproject') symlinked_subproject = os.path.join(testdir, 'subprojects', 'symlinked_subproject')
@ -4583,7 +4583,7 @@ class AllPlatformTests(BasePlatformTests):
self.build() self.build()
def test_configure_same_noop(self): def test_configure_same_noop(self):
testdir = os.path.join(self.unit_test_dir, '108 configure same noop') testdir = os.path.join(self.unit_test_dir, '109 configure same noop')
args = [ args = [
'-Dstring=val', '-Dstring=val',
'-Dboolean=true', '-Dboolean=true',

@ -1350,7 +1350,7 @@ class LinuxlikeTests(BasePlatformTests):
see: https://github.com/mesonbuild/meson/issues/9000 see: https://github.com/mesonbuild/meson/issues/9000
https://stackoverflow.com/questions/48532868/gcc-library-option-with-a-colon-llibevent-a 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 oldprefix = self.prefix
# install into installdir without using DESTDIR # install into installdir without using DESTDIR
installdir = self.installdir installdir = self.installdir
@ -1363,7 +1363,7 @@ class LinuxlikeTests(BasePlatformTests):
self.new_builddir() self.new_builddir()
env = {'LIBRARY_PATH': os.path.join(installdir, self.libdir), env = {'LIBRARY_PATH': os.path.join(installdir, self.libdir),
'PKG_CONFIG_PATH': _prepend_pkg_config_path(os.path.join(installdir, self.libdir, 'pkgconfig'))} '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) self.init(testdir,override_envvars=env)
# test for link with full path # test for link with full path
@ -1775,7 +1775,7 @@ class LinuxlikeTests(BasePlatformTests):
@skipUnless(is_linux() or is_osx(), 'Test only applicable to Linux and macOS') @skipUnless(is_linux() or is_osx(), 'Test only applicable to Linux and macOS')
def test_install_strip(self): 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.init(testdir)
self.build() self.build()
@ -1822,7 +1822,7 @@ class LinuxlikeTests(BasePlatformTests):
self.assertFalse(cpp.compiler_args([f'-isystem{symlink}' for symlink in default_symlinks]).to_native()) self.assertFalse(cpp.compiler_args([f'-isystem{symlink}' for symlink in default_symlinks]).to_native())
def test_freezing(self): def test_freezing(self):
testdir = os.path.join(self.unit_test_dir, '109 freeze') testdir = os.path.join(self.unit_test_dir, '110 freeze')
self.init(testdir) self.init(testdir)
self.build() self.build()
with self.assertRaises(subprocess.CalledProcessError) as e: with self.assertRaises(subprocess.CalledProcessError) as e:

@ -373,7 +373,7 @@ class NativeFileTests(BasePlatformTests):
def test_java_classpath(self): def test_java_classpath(self):
if self.backend is not Backend.ninja: if self.backend is not Backend.ninja:
raise SkipTest('Jar is only supported with Ninja') raise SkipTest('Jar is only supported with Ninja')
testdir = os.path.join(self.unit_test_dir, '110 classpath') testdir = os.path.join(self.unit_test_dir, '111 classpath')
self.init(testdir) self.init(testdir)
self.build() self.build()
one_build_path = get_classpath(os.path.join(self.builddir, 'one.jar')) one_build_path = get_classpath(os.path.join(self.builddir, 'one.jar'))

@ -37,7 +37,7 @@ class PlatformAgnosticTests(BasePlatformTests):
Tests that find_program() with a relative path does not find the program Tests that find_program() with a relative path does not find the program
in current workdir. 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) self.init(testdir, workdir=testdir)
def test_invalid_option_names(self): def test_invalid_option_names(self):
@ -73,11 +73,11 @@ class PlatformAgnosticTests(BasePlatformTests):
interp.process(fname) interp.process(fname)
def test_python_dependency_without_pkgconfig(self): 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'}) self.init(testdir, override_envvars={'PKG_CONFIG': 'notfound'})
def test_debug_function_outputs_to_meson_log(self): 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' log_msg = 'This is an example debug output, should only end up in debug log'
output = self.init(testdir) output = self.init(testdir)
@ -89,7 +89,7 @@ class PlatformAgnosticTests(BasePlatformTests):
self.assertIn(log_msg, mesonlog) self.assertIn(log_msg, mesonlog)
def test_new_subproject_reconfigure(self): def test_new_subproject_reconfigure(self):
testdir = os.path.join(self.unit_test_dir, '107 new subproject on reconfigure') testdir = os.path.join(self.unit_test_dir, '108 new subproject on reconfigure')
self.init(testdir) self.init(testdir)
self.build() self.build()

Loading…
Cancel
Save