Skip failing tests when they won't fail in the expected way

pull/6620/head
Jon Turney 5 years ago
parent f107f9b396
commit d1920886a1
No known key found for this signature in database
GPG Key ID: C7C86F0370285C81
  1. 2
      test cases/failing/19 target clash/meson.build
  2. 2
      test cases/failing/32 exe static shared/meson.build
  3. 4
      test cases/failing/36 pkgconfig dependency impossible conditions/meson.build
  4. 2
      test cases/failing/42 custom target outputs not matching install_dirs/meson.build
  5. 6
      test cases/failing/54 wrong shared crate type/meson.build
  6. 6
      test cases/failing/55 wrong static crate type/meson.build
  7. 4
      test cases/failing/68 wrong boost module/meson.build
  8. 2
      test cases/failing/76 link with shared module on osx/meson.build
  9. 6
      test cases/failing/80 framework dependency with version/meson.build
  10. 2
      test cases/failing/82 gl dependency with version/meson.build
  11. 5
      test cases/failing/84 gtest dependency with version/meson.build
  12. 10
      test cases/failing/85 dub libray/meson.build
  13. 10
      test cases/failing/86 dub executable/meson.build
  14. 10
      test cases/failing/87 dub compiler/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')

@ -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)

@ -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'])

@ -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',

@ -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')

@ -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')

@ -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'])

@ -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')

@ -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')

@ -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

@ -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')

@ -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)

@ -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)

@ -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

Loading…
Cancel
Save