diff --git a/test cases/failing/19 target clash/meson.build b/test cases/failing/19 target clash/meson.build index ca09fb568..4fd09348e 100644 --- a/test cases/failing/19 target clash/meson.build +++ b/test cases/failing/19 target clash/meson.build @@ -8,7 +8,7 @@ project('clash', 'c') # output location is redirected. if host_machine.system() == 'windows' or host_machine.system() == 'cygwin' - error('This is expected.') + error('MESON_SKIP_TEST test only works on platforms where executables have no suffix.') endif executable('clash', 'clash.c') diff --git a/test cases/failing/32 exe static shared/meson.build b/test cases/failing/32 exe static shared/meson.build index b1027647d..2ae512583 100644 --- a/test cases/failing/32 exe static shared/meson.build +++ b/test cases/failing/32 exe static shared/meson.build @@ -2,7 +2,7 @@ project('statchain', 'c') host_system = host_machine.system() if host_system == 'windows' or host_system == 'darwin' - error('Test only fails on Linux and BSD') + error('MESON_SKIP_TEST test only fails on Linux and BSD') endif statlib = static_library('stat', 'stat.c', pic : false) diff --git a/test cases/failing/36 pkgconfig dependency impossible conditions/meson.build b/test cases/failing/36 pkgconfig dependency impossible conditions/meson.build index 54d434c09..874b58177 100644 --- a/test cases/failing/36 pkgconfig dependency impossible conditions/meson.build +++ b/test cases/failing/36 pkgconfig dependency impossible conditions/meson.build @@ -1,3 +1,7 @@ project('impossible-dep-test', 'c', version : '1.0') +if not dependency('zlib', required: false).found() + error('MESON_SKIP_TEST test requires zlib') +endif + dependency('zlib', version : ['>=1.0', '<1.0']) diff --git a/test cases/failing/42 custom target outputs not matching install_dirs/meson.build b/test cases/failing/42 custom target outputs not matching install_dirs/meson.build index 45bd7b397..765e23764 100644 --- a/test cases/failing/42 custom target outputs not matching install_dirs/meson.build +++ b/test cases/failing/42 custom target outputs not matching install_dirs/meson.build @@ -3,7 +3,7 @@ project('outputs not matching install_dirs', 'c') gen = find_program('generator.py') if meson.backend() != 'ninja' - error('Failing manually, test is only for the ninja backend') + error('MESON_SKIP_TEST test is only for the ninja backend') endif custom_target('too-few-install-dirs', diff --git a/test cases/failing/54 wrong shared crate type/meson.build b/test cases/failing/54 wrong shared crate type/meson.build index 69ac3dad5..b9fcad4e5 100644 --- a/test cases/failing/54 wrong shared crate type/meson.build +++ b/test cases/failing/54 wrong shared crate type/meson.build @@ -1,3 +1,7 @@ -project('test', 'rust') +project('test') + +if not add_languages('rust', required: false) + error('MESON_SKIP_TEST test requires rust compiler') +endif shared_library('test', 'foo.rs', rust_crate_type : 'staticlib') diff --git a/test cases/failing/55 wrong static crate type/meson.build b/test cases/failing/55 wrong static crate type/meson.build index c094613b2..109907f96 100644 --- a/test cases/failing/55 wrong static crate type/meson.build +++ b/test cases/failing/55 wrong static crate type/meson.build @@ -1,3 +1,7 @@ -project('test', 'rust') +project('test') + +if not add_languages('rust', required: false) + error('MESON_SKIP_TEST test requires rust compiler') +endif static_library('test', 'foo.rs', rust_crate_type : 'cdylib') diff --git a/test cases/failing/68 wrong boost module/meson.build b/test cases/failing/68 wrong boost module/meson.build index 7fb3a40b2..937e58749 100644 --- a/test cases/failing/68 wrong boost module/meson.build +++ b/test cases/failing/68 wrong boost module/meson.build @@ -1,5 +1,9 @@ project('boosttest', 'cpp', default_options : ['cpp_std=c++11']) +if not dependency('boost', required: false).found() + error('MESON_SKIP_TEST test requires boost') +endif + # abc doesn't exist linkdep = dependency('boost', modules : ['thread', 'system', 'test', 'abc']) diff --git a/test cases/failing/76 link with shared module on osx/meson.build b/test cases/failing/76 link with shared module on osx/meson.build index 2c714f97a..bf18b3626 100644 --- a/test cases/failing/76 link with shared module on osx/meson.build +++ b/test cases/failing/76 link with shared module on osx/meson.build @@ -1,7 +1,7 @@ project('link with shared module', 'c') if host_machine.system() != 'darwin' - error('Test only fails on OSX') + error('MESON_SKIP_TEST test only fails on OSX') endif m = shared_module('mymodule', 'module.c') diff --git a/test cases/failing/80 framework dependency with version/meson.build b/test cases/failing/80 framework dependency with version/meson.build index 1ead388a9..b7e04bab4 100644 --- a/test cases/failing/80 framework dependency with version/meson.build +++ b/test cases/failing/80 framework dependency with version/meson.build @@ -1,4 +1,8 @@ project('framework dependency with version', 'c') + +if host_machine.system() != 'darwin' + error('MESON_SKIP_TEST test only applicable on darwin') +endif + # do individual frameworks have a meaningful version to test? And multiple frameworks might be listed... -# otherwise we're not on OSX and this will definitely fail dep = dependency('appleframeworks', modules: 'foundation', version: '>0') diff --git a/test cases/failing/82 gl dependency with version/meson.build b/test cases/failing/82 gl dependency with version/meson.build index 3014d433f..012709302 100644 --- a/test cases/failing/82 gl dependency with version/meson.build +++ b/test cases/failing/82 gl dependency with version/meson.build @@ -2,7 +2,7 @@ project('gl dependency with version', 'c') host_system = host_machine.system() if host_system != 'windows' and host_system != 'darwin' - error('Test only fails on Windows and OSX') + error('MESON_SKIP_TEST: test only fails on Windows and OSX') endif # gl dependency found via system method doesn't have a meaningful version to check diff --git a/test cases/failing/84 gtest dependency with version/meson.build b/test cases/failing/84 gtest dependency with version/meson.build index 3d909942c..b43a04733 100644 --- a/test cases/failing/84 gtest dependency with version/meson.build +++ b/test cases/failing/84 gtest dependency with version/meson.build @@ -1,3 +1,8 @@ project('gtest dependency with version', ['c', 'cpp']) + +if not dependency('gtest', method: 'system', required: false).found() + error('MESON_SKIP_TEST test requires gtest') +endif + # discovering gtest version is not yet implemented dep = dependency('gtest', method: 'system', version: '>0') diff --git a/test cases/failing/85 dub libray/meson.build b/test cases/failing/85 dub libray/meson.build index 5b0ccaced..306d5b3e5 100644 --- a/test cases/failing/85 dub libray/meson.build +++ b/test cases/failing/85 dub libray/meson.build @@ -1,3 +1,11 @@ -project('dub', 'd') +project('dub') + +if not add_languages('d', required: false) + error('MESON_SKIP_TEST test requires D compiler') +endif + +if not find_program('dub', required: false).found() + error('MESON_SKIP_TEST test requires dub') +endif dependency('dubtestproject', method: 'dub') # Not library (none) diff --git a/test cases/failing/86 dub executable/meson.build b/test cases/failing/86 dub executable/meson.build index 63fd63134..9a134ea21 100644 --- a/test cases/failing/86 dub executable/meson.build +++ b/test cases/failing/86 dub executable/meson.build @@ -1,3 +1,11 @@ -project('dub', 'd') +project('dub') + +if not add_languages('d', required: false) + error('MESON_SKIP_TEST test requires D compiler') +endif + +if not find_program('dub', required: false).found() + error('MESON_SKIP_TEST test requires dub') +endif dependency('dubtestproject:test1', method: 'dub') # Not library (executable) diff --git a/test cases/failing/87 dub compiler/meson.build b/test cases/failing/87 dub compiler/meson.build index c93ccbc2a..36f1849e5 100644 --- a/test cases/failing/87 dub compiler/meson.build +++ b/test cases/failing/87 dub compiler/meson.build @@ -1,4 +1,8 @@ -project('dub', 'd') +project('dub') + +if not add_languages('d', required: false) + error('MESON_SKIP_TEST test requires D compiler') +endif if meson.get_compiler('d').get_id() == 'dmd' if host_machine.system() == 'windows' or host_machine.system() == 'cygwin' @@ -6,4 +10,8 @@ if meson.get_compiler('d').get_id() == 'dmd' endif endif +if not find_program('dub', required: false).found() + error('MESON_SKIP_TEST test requires dub') +endif + dependency('dubtestproject:test2', method: 'dub') # Compiler mismatch