tests: remove compiler requirement in various unneeded cases

Compiled languages are Meson's bread and butter, but hardly required.
This is convenient, because many test caases specifically, do not care
about testing the compiler interactions.

In such cases, we can skip doing compiler lookups which aren't used, as
they only slow down test setup.
pull/10731/head
Eli Schwartz 3 years ago committed by Xavier Claessens
parent 75b8dc5c9e
commit b7245d3f27
  1. 2
      test cases/common/10 man install/meson.build
  2. 2
      test cases/common/101 testframework options/meson.build
  3. 2
      test cases/common/106 multiple dir configure file/meson.build
  4. 2
      test cases/common/108 ternary/meson.build
  5. 2
      test cases/common/109 custom target capture/meson.build
  6. 2
      test cases/common/111 pathjoin/meson.build
  7. 2
      test cases/common/113 interpreter copy mutable var on assignment/meson.build
  8. 2
      test cases/common/114 skip/meson.build
  9. 2
      test cases/common/12 data/meson.build
  10. 2
      test cases/common/123 custom target directory install/meson.build
  11. 2
      test cases/common/136 empty build file/meson.build
  12. 2
      test cases/common/139 mesonintrospect from scripts/meson.build
  13. 2
      test cases/common/140 custom target multiple outputs/meson.build
  14. 2
      test cases/common/143 list of file sources/meson.build
  15. 2
      test cases/common/162 subdir if_found/meson.build
  16. 2
      test cases/common/163 default options prefix dependent defaults/meson.build
  17. 2
      test cases/common/166 yield/meson.build
  18. 2
      test cases/common/166 yield/subprojects/sub/meson.build
  19. 2
      test cases/common/176 subproject version/meson.build
  20. 2
      test cases/common/176 subproject version/subprojects/a/meson.build
  21. 2
      test cases/common/177 subdir_done/meson.build
  22. 2
      test cases/common/191 subproject array version/meson.build
  23. 2
      test cases/common/191 subproject array version/subprojects/foo/meson.build
  24. 2
      test cases/common/193 feature option disabled/meson.build
  25. 2
      test cases/common/202 custom target build by default/meson.build
  26. 2
      test cases/common/217 test priorities/meson.build
  27. 2
      test cases/common/232 dependency allow_fallback/meson.build
  28. 2
      test cases/common/237 fstrings/meson.build
  29. 2
      test cases/common/238 dependency include_type inconsistency/meson.build
  30. 2
      test cases/common/238 dependency include_type inconsistency/subprojects/baz/meson.build
  31. 2
      test cases/common/238 dependency include_type inconsistency/subprojects/foo/meson.build
  32. 2
      test cases/common/239 includedir violation/meson.build
  33. 2
      test cases/common/239 includedir violation/subprojects/sub/meson.build
  34. 2
      test cases/common/240 dependency native host == build/meson.build
  35. 2
      test cases/common/242 custom target feed/meson.build
  36. 2
      test cases/common/246 dependency fallbacks/meson.build
  37. 3
      test cases/common/26 find program/meson.build
  38. 2
      test cases/common/34 logic ops/meson.build
  39. 2
      test cases/common/35 string operations/meson.build
  40. 2
      test cases/common/43 subproject options/meson.build
  41. 2
      test cases/common/43 subproject options/subprojects/subproject/meson.build
  42. 2
      test cases/common/49 custom target/meson.build
  43. 2
      test cases/common/56 array methods/meson.build
  44. 2
      test cases/common/59 install subdir/meson.build
  45. 2
      test cases/common/61 number arithmetic/meson.build
  46. 2
      test cases/common/62 string arithmetic/meson.build
  47. 2
      test cases/common/63 array arithmetic/meson.build
  48. 2
      test cases/common/64 arithmetic bidmas/meson.build
  49. 2
      test cases/common/67 modules/meson.build
  50. 2
      test cases/common/69 configure file in custom target/meson.build
  51. 2
      test cases/common/70 external test program/meson.build
  52. 2
      test cases/common/71 ctarget dependency/meson.build
  53. 2
      test cases/common/84 plusassign/meson.build
  54. 2
      test cases/common/85 skip subdir/meson.build
  55. 2
      test cases/common/97 find program path/meson.build
  56. 2
      test cases/failing/10 out of bounds/meson.build
  57. 2
      test cases/failing/104 no fallback/meson.build
  58. 2
      test cases/failing/105 feature require/meson.build
  59. 2
      test cases/failing/106 feature require.bis/meson.build
  60. 2
      test cases/failing/108 enter subdir twice/meson.build
  61. 2
      test cases/failing/109 invalid fstring/meson.build
  62. 2
      test cases/failing/11 object arithmetic/meson.build
  63. 2
      test cases/failing/112 cmake executable dependency/meson.build
  64. 2
      test cases/failing/12 string arithmetic/meson.build
  65. 2
      test cases/failing/122 cmake subproject error/meson.build
  66. 2
      test cases/failing/13 array arithmetic/meson.build
  67. 2
      test cases/failing/14 invalid option name/meson.build
  68. 2
      test cases/failing/18 wrong plusassign/meson.build
  69. 2
      test cases/failing/20 version/meson.build
  70. 2
      test cases/failing/21 subver/meson.build
  71. 2
      test cases/failing/21 subver/subprojects/foo/meson.build
  72. 2
      test cases/failing/22 assert/meson.build
  73. 2
      test cases/failing/24 int conversion/meson.build
  74. 2
      test cases/failing/25 badlang/meson.build
  75. 2
      test cases/failing/26 output subdir/meson.build
  76. 2
      test cases/failing/27 noprog use/meson.build
  77. 2
      test cases/failing/28 no crossprop/meson.build
  78. 2
      test cases/failing/29 nested ternary/meson.build
  79. 2
      test cases/failing/3 missing subdir/meson.build
  80. 2
      test cases/failing/30 invalid man extension/meson.build
  81. 2
      test cases/failing/31 no man extension/meson.build
  82. 2
      test cases/failing/33 non-root subproject/meson.build
  83. 2
      test cases/failing/34 dependency not-required then required/meson.build
  84. 2
      test cases/failing/38 prefix absolute/meson.build
  85. 2
      test cases/failing/4 missing meson.build/meson.build
  86. 2
      test cases/failing/40 custom target plainname many inputs/meson.build
  87. 2
      test cases/failing/41 custom target outputs not matching install_dirs/meson.build
  88. 2
      test cases/failing/43 abs subdir/meson.build
  89. 2
      test cases/failing/44 abspath to srcdir/meson.build
  90. 2
      test cases/failing/5 misplaced option/meson.build
  91. 2
      test cases/failing/50 inconsistent comparison/meson.build
  92. 2
      test cases/failing/55 or on new line/meson.build
  93. 2
      test cases/failing/6 missing incdir/meson.build
  94. 2
      test cases/failing/60 subproj filegrab/meson.build
  95. 2
      test cases/failing/62 grab sibling/meson.build
  96. 2
      test cases/failing/62 grab sibling/subprojects/b/meson.build
  97. 2
      test cases/failing/67 install_data rename bad size/meson.build
  98. 2
      test cases/failing/69 dual override/meson.build
  99. 2
      test cases/failing/7 go to subproject/meson.build
  100. 2
      test cases/failing/70 override used/meson.build
  101. Some files were not shown because too many files have changed in this diff Show More

@ -1,4 +1,4 @@
project('man install', 'c')
project('man install')
m1 = install_man('foo.1')
m2 = install_man('bar.2')
m3 = install_man('foo.fr.1', locale: 'fr')

@ -1,7 +1,7 @@
# normally run only from run_tests.py or run_project_tests.py
# else do like
# meson build '-Dtestoption=A string with spaces' -Dother_one=true -Dcombo_opt=one -Dprefix=/usr -Dlibdir=lib -Dbackend=ninja -Dwerror=True
project('options', 'c')
project('options')
assert(get_option('testoption') == 'A string with spaces', 'Incorrect value for testoption option.')
assert(get_option('other_one') == true, 'Incorrect value for other_one option.')

@ -1,4 +1,4 @@
project('multiple dir configure file', 'c')
project('multiple dir configure file')
subdir('subdir')

@ -1,4 +1,4 @@
project('ternary operator', 'c')
project('ternary operator')
x = true
one = true ? 1 : error('False branch should not be evaluated')

@ -1,4 +1,4 @@
project('custom target', 'c')
project('custom target')
python3 = import('python3').find_python()

@ -1,4 +1,4 @@
project('pathjoin', 'c')
project('pathjoin')
# Test string-args form since that is the canonical way
assert(join_paths('foo') == 'foo', 'Single argument join is broken')

@ -1,4 +1,4 @@
project('foo', 'c')
project('foo')
a = configuration_data()
a.set('HELLO', 1)

@ -1,3 +1,3 @@
project('skip', 'c')
project('skip')
error('MESON_SKIP_TEST this test is always skipped.')

@ -1,4 +1,4 @@
project('data install test', 'c',
project('data install test',
default_options : ['install_umask=preserve'])
install_data(sources : 'datafile.dat', install_dir : 'share/progname')
# Some file in /etc that is only read-write by root; add a sticky bit for testing

@ -1,4 +1,4 @@
project('custom-target-dir-install', 'c')
project('custom-target-dir-install')
docgen = find_program('docgen.py')

@ -1,2 +1,2 @@
project('subdir with empty meson.build test', 'c')
project('subdir with empty meson.build test')
subdir('subdir')

@ -1,4 +1,4 @@
project('mesonintrospect from scripts', 'c')
project('mesonintrospect from scripts')
python = import('python3').find_python()

@ -1,4 +1,4 @@
project('multiple outputs install', 'c')
project('multiple outputs install')
gen = find_program('generator.py')

@ -1,4 +1,4 @@
project('test', 'c')
project('test')
mod_py = import('python3')
python = mod_py.find_python()

@ -1,4 +1,4 @@
project('subdir if found', 'c')
project('subdir if found')
found_dep = declare_dependency()
not_found_dep = dependency('nonexisting', required : false)

@ -1 +1 @@
project('default options prefix dependent defaults ', 'c', default_options : ['sharedstatedir=/sharedstate', 'prefix=/usr'])
project('default options prefix dependent defaults ', default_options : ['sharedstatedir=/sharedstate', 'prefix=/usr'])

@ -1,4 +1,4 @@
project('yield_options', 'c')
project('yield_options')
subproject('sub')

@ -1,4 +1,4 @@
project('subbie', 'c')
project('subbie')
assert(get_option('unshared_option') == 'three', 'Unshared option has wrong value in subproject.')
assert(get_option('shared_option') == 'two', 'Shared option has wrong value in subproject.')

@ -1,4 +1,4 @@
project('subproject version', 'c',
project('subproject version',
version : '2.3.4',
license: 'mylicense')

@ -1,4 +1,4 @@
project('mysubproject', 'c',
project('mysubproject',
version : '1.0.0',
license : 'sublicense')

@ -1,7 +1,7 @@
# Should run, even though main.cpp does not exist and we call error in the last line.
# subdir_done jumps to end, so both lines are not executed.
project('example exit', 'cpp')
project('example exit')
if true
subdir_done()

@ -1,3 +1,3 @@
project('master', 'c')
project('master')
x = subproject('foo', version : ['>=1.0.0', '<2.0'])

@ -1 +1 @@
project('foo', 'c', version : '1.0.0')
project('foo', version : '1.0.0')

@ -1,4 +1,4 @@
project('feature user option', 'c',
project('feature user option',
default_options : ['auto_features=disabled'])
feature_opts = get_option('auto_features')

@ -1,4 +1,4 @@
project('custom-target-dir-install', 'c')
project('custom-target-dir-install')
docgen = find_program('docgen.py')

@ -1,4 +1,4 @@
project('test priorities', 'c')
project('test priorities')
test_prog = find_program('testprog.py')

@ -1,4 +1,4 @@
project('subproject fallback', 'c')
project('subproject fallback')
foob_dep = dependency('foob', allow_fallback: true, required: false)
assert(foob_dep.found())

@ -1,4 +1,4 @@
project('meson-test', 'c')
project('meson-test')
n = 10
m = 'bar'

@ -1,4 +1,4 @@
project('test', 'c', 'cpp')
project('test')
foo_dep = subproject('foo').get_variable('foo_dep')

@ -1,3 +1,3 @@
project('baz', 'cpp')
project('baz')
baz_dep = declare_dependency()

@ -1,4 +1,4 @@
project('foo', 'c', 'cpp')
project('foo')
baz_dep = dependency('baz',
fallback: ['baz', 'baz_dep'],

@ -1,4 +1,4 @@
project('foo', 'c')
project('foo')
# It is fine to include the root source dir
include_directories('.')

@ -1,3 +1,3 @@
project('subproj', 'c')
project('subproj')
include_directories('.')

@ -1,4 +1,4 @@
project('foo', 'c')
project('foo')
if meson.is_cross_build()
error('MESON_SKIP_TEST Test does not make sense for cross builds')

@ -1,4 +1,4 @@
project('custom target feed', 'c')
project('custom target feed')
python3 = import('python3').find_python()

@ -1,4 +1,4 @@
project('dependency fallbacks', 'c')
project('dependency fallbacks')
# pkg-config has 'libpng' but cmake has 'png' and we have a 'png' subproject
# for platforms that have neither.

@ -1,4 +1,4 @@
project('find program', 'c')
project('find program')
if build_machine.system() == 'windows'
# Things Windows does not provide:
@ -15,6 +15,7 @@ else
arguments : ['@INPUT@', '@OUTPUT@'])
generated = gen.process('source.in')
add_languages('c', required: true)
e = executable('prog', generated)
test('external exe', e)
endif

@ -1,4 +1,4 @@
project('logicopts', 'c')
project('logicopts')
t = true
f = false

@ -1,4 +1,4 @@
project('string formatting', 'c')
project('string formatting')
templ = '@0@bar@1@'

@ -1,4 +1,4 @@
project('suboptions', 'c')
project('suboptions')
subproject('subproject')

@ -1,4 +1,4 @@
project('subproject', 'c')
project('subproject')
if get_option('opt')
error('option set when it should be unset.')

@ -1,4 +1,4 @@
project('custom target', 'c')
project('custom target')
python = find_program('python3', required : false)
if not python.found()

@ -1,4 +1,4 @@
project('array methods', 'c')
project('array methods')
empty = []
one = ['abc']

@ -1,4 +1,4 @@
project('install a whole subdir', 'c',
project('install a whole subdir',
default_options : ['install_umask=preserve'])
# A subdir with an exclusion:

@ -1,4 +1,4 @@
project('number arithmetic', 'c')
project('number arithmetic')
if 6 + 4 != 10
error('Number addition is broken')

@ -1,4 +1,4 @@
project('string arithmetic', 'c', meson_version: '>=0.62.0')
project('string arithmetic', meson_version: '>=0.62.0')
assert('foo' + 'bar' == 'foobar')
assert('foo' + 'bar' + 'baz' == 'foobarbaz')

@ -1,4 +1,4 @@
project('array arithmetic', 'c')
project('array arithmetic')
array1 = ['foo', 'bar']
array2 = ['qux', 'baz']

@ -1,4 +1,4 @@
project('arithmetic bidmas', 'c')
project('arithmetic bidmas')
if 5 * 3 - 6 / 2 + 1 != 13
error('Arithmetic bidmas broken')

@ -1,4 +1,4 @@
project('module test', 'c')
project('module test')
modtest = import('modtest')
modtest.print_hello()

@ -1,4 +1,4 @@
project('conf file in custom target', 'c')
project('conf file in custom target')
subdir('inc')
subdir('src')

@ -1,3 +1,3 @@
project('test is external', 'c')
project('test is external')
test('external', find_program('mytest.py'), args : ['correct'])

@ -1,4 +1,4 @@
project('custom target dependency', 'c')
project('custom target dependency')
# Sometimes custom targets do not take input files
# but instead do globbing or some similar wackiness.

@ -1,4 +1,4 @@
project('plusassign', 'c')
project('plusassign')
x = []

@ -1,3 +1,3 @@
project('foo', 'c')
project('foo')
subdir('subdir1/subdir2')

@ -1,4 +1,4 @@
project('find program', 'c')
project('find program')
python = import('python3').find_python()

@ -1,4 +1,4 @@
project('out of bounds', 'c')
project('out of bounds')
x = []
y = x[0]

@ -1,2 +1,2 @@
project('no fallback', 'c')
project('no fallback')
foob_dep = dependency('foob', allow_fallback: false, required: true)

@ -1,2 +1,2 @@
project('no fallback', 'c')
project('no fallback')
foo = get_option('reqfeature').require(false, error_message: 'frobnicator not available')

@ -1,2 +1,2 @@
project('no fallback', 'c')
project('no fallback')
foo = get_option('reqfeature').require(false)

@ -1,3 +1,3 @@
project('subdir2', 'c')
project('subdir2')
subdir('sub')
subdir('sub')

@ -1,3 +1,3 @@
project('invalid-fstring', 'c')
project('invalid-fstring')
z = f'invalid fstring: @foo@'

@ -1,3 +1,3 @@
project('object arithmetic', 'c')
project('object arithmetic')
foo = '5' + meson

@ -1,4 +1,4 @@
project('cmake-executable-dependency', ['c', 'cpp'])
project('cmake-executable-dependency', 'c')
if not find_program('cmake', required: false).found()
error('MESON_SKIP_TEST CMake is not installed')

@ -1,3 +1,3 @@
project('string arithmetic', 'c')
project('string arithmetic')
foo = 'a' + 3

@ -1,4 +1,4 @@
project('cmake-executable-dependency', ['c', 'cpp'])
project('cmake-executable-dependency')
if not find_program('cmake', required: false).found()
error('MESON_SKIP_TEST CMake is not installed')

@ -1,3 +1,3 @@
project('array arithmetic', 'c')
project('array arithmetic')
foo = ['a', 'b'] * 3

@ -1 +1 @@
project('foo', 'c')
project('foo')

@ -1,3 +1,3 @@
project('false plusassign', 'c')
project('false plusassign')
3 += 4

@ -1 +1 @@
project('version mismatch', 'c', meson_version : '>100.0.0')
project('version mismatch', meson_version : '>100.0.0')

@ -1,3 +1,3 @@
project('master', 'c')
project('master')
x = subproject('foo', version : '>1.0.0')

@ -1 +1 @@
project('foo', 'c', version : '1.0.0')
project('foo', version : '1.0.0')

@ -1,3 +1,3 @@
project('failing assert', 'c')
project('failing assert')
assert(false, 'I am fail.')

@ -1,3 +1,3 @@
project('int conversion', 'c')
project('int conversion')
'notanumber'.to_int()

@ -1,3 +1,3 @@
project('badlang', 'c')
project('badlang')
add_languages('nonexisting')

@ -1,4 +1,4 @@
project('outdir path', 'c')
project('outdir path')
configure_file(input : 'foo.in',
output : 'subdir/foo',

@ -1,4 +1,4 @@
project('using not found exe', 'c')
project('using not found exe')
nope = find_program('nonexisting', required : false)

@ -1,3 +1,3 @@
project('no crossprop', 'c')
project('no crossprop')
message(meson.get_cross_property('nonexisting'))

@ -1,3 +1,3 @@
project('nested ternary', 'c')
project('nested ternary')
x = true ? (false ? 1 : 0) : 2

@ -1,3 +1,3 @@
project('subdir', 'c')
project('subdir')
subdir('missing')

@ -1,2 +1,2 @@
project('man install', 'c')
project('man install')
m1 = install_man('foo.a1')

@ -1,2 +1,2 @@
project('man install', 'c')
project('man install')
m1 = install_man('foo')

@ -1,3 +1,3 @@
project('non-root subproject', 'c')
project('non-root subproject')
subdir('some')

@ -1,4 +1,4 @@
project('dep-test', 'c', version : '1.0')
project('dep-test', version : '1.0')
foo_dep = dependency('foo-bar-xyz-12.3', required : false)
bar_dep = dependency('foo-bar-xyz-12.3')

@ -1,2 +1,2 @@
project('prefix-abs', 'c',
project('prefix-abs',
default_options : ['prefix=some/path/notabs'])

@ -1,3 +1,3 @@
project('missing meson.build', 'c')
project('missing meson.build')
subdir('subdir')

@ -1,4 +1,4 @@
project('plain name many inputs', 'c')
project('plain name many inputs')
catfiles = find_program('catfiles.py')

@ -1,4 +1,4 @@
project('outputs not matching install_dirs', 'c')
project('outputs not matching install_dirs')
gen = find_program('generator.py')

@ -1,4 +1,4 @@
project('abs subdir', 'c')
project('abs subdir')
# For some reason people insist on doing this, probably
# because Make has taught them to never rely on anything.

@ -1,3 +1,3 @@
project('meson', 'c')
project('meson')
include_directories(meson.current_source_dir())

@ -1,3 +1,3 @@
project('misplaced option', 'c')
project('misplaced option')
option('dummy', type : 'string')

@ -1,4 +1,4 @@
project('kwarg before arg', 'c')
project('kwarg before arg')
# All of these should fail, though only the first one will error out if
# everything's working correctly.

@ -1,4 +1,4 @@
project('silent_or', 'c')
project('silent_or')
if get_option('foo') == 'true'
or get_option('foo') == 'auto'

@ -1,3 +1,3 @@
project('missing incdir', 'c')
project('missing incdir')
inc = include_directories('nosuchdir')

@ -1,4 +1,4 @@
project('mainproj', 'c')
project('mainproj')
# Try to grab a file from a parent project.

@ -1,3 +1,3 @@
project('master', 'c')
project('master')
subproject('a')

@ -1,3 +1,3 @@
projecT('b', 'c')
projecT('b')
message('I do nothing.')

@ -1,3 +1,3 @@
project('data install test', 'c')
project('data install test')
install_data(['file1.txt', 'file2.txt'], rename : 'just one name')

@ -1,4 +1,4 @@
project('yo dawg', 'c')
project('yo dawg')
p = find_program('overrides.py')
meson.override_find_program('override', p)

@ -1,3 +1,3 @@
project('fff', 'c')
project('fff')
subdir('subprojects')

@ -1,4 +1,4 @@
project('overridde an already found exe', 'c')
project('overridde an already found exe')
old = find_program('something.py')
replacement = find_program('other.py')

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save