diff options
Diffstat (limited to 'test/meson.build')
-rw-r--r-- | test/meson.build | 83 |
1 files changed, 52 insertions, 31 deletions
diff --git a/test/meson.build b/test/meson.build index 2919735..cddb05a 100644 --- a/test/meson.build +++ b/test/meson.build @@ -20,8 +20,8 @@ if get_option('lint') codespell, args: [ '-d', - '-q', '3', - '-S', ','.join(ignore), + ['-q', '3'], + ['-S', ','.join(ignore)], lv2_source_root / 'doc', lv2_source_root / 'lv2', lv2_source_root / 'lv2specgen', @@ -36,25 +36,29 @@ if get_option('lint') serdi = find_program( 'serdi', required: get_option('tests'), - version: '>= 0.31.5', + version: '>= 0.32.0', + ) + native_build = ( + not meson.is_cross_build() + and host_machine.system() != 'windows' ) - native_build = not meson.is_cross_build() and host_machine.system() != 'windows' if serdi.found() and native_build - lv2_check_syntax = files(lv2_source_root / 'scripts' / 'lv2_check_syntax.py') + lv2_check_syntax = files( + lv2_source_root / 'scripts' / 'lv2_check_syntax.py', + ) - test('syntax', - lv2_check_syntax, - args: ['--serdi', serdi.full_path()] + spec_files + schema_data, - suite: 'data') + test( + 'syntax', + lv2_check_syntax, + args: ['--serdi', serdi.full_path()] + spec_files + schema_data, + suite: 'data', + ) endif # Check that specification data validates sord_validate = find_program('sord_validate', required: get_option('tests')) if sord_validate.found() - test('valid', - sord_validate, - args: spec_files + schema_data, - suite: 'data') + test('valid', sord_validate, args: spec_files + schema_data, suite: 'data') endif endif @@ -63,25 +67,31 @@ endif ######## # Check that all the headers compile cleanly in C -test('c', - executable( - 'test_build_c', - files('test_build.c'), - c_args: c_suppressions, - dependencies: [lv2_dep], - ), - suite: 'build') +test( + 'c', + executable( + 'test_build_c', + files('test_build.c'), + c_args: c_suppressions, + dependencies: [lv2_dep], + implicit_include_directories: false, + ), + suite: 'build', +) # Check that all the headers compile cleanly in C++ if is_variable('cpp') - test('cpp', - executable( - 'test_build_cpp', - files('cpp/test_build.cpp'), - cpp_args: cpp_suppressions, - dependencies: [lv2_dep], - ), - suite: 'build') + test( + 'cpp', + executable( + 'test_build_cpp', + files('cpp/test_build.cpp'), + cpp_args: cpp_suppressions, + dependencies: [lv2_dep], + implicit_include_directories: false, + ), + suite: 'build', + ) endif ########## @@ -104,7 +114,12 @@ if get_option('lint') black = find_program('black', required: get_option('tests')) if black.found() black_opts = ['-l', '79', '-q', '--check'] - test('black', black, args: black_opts + all_python_scripts, suite: 'scripts') + test( + 'black', + black, + args: black_opts + all_python_scripts, + suite: 'scripts', + ) endif # Check scripts for errors with flake8 @@ -144,6 +159,11 @@ test_names = [ 'forge_overflow', ] +atom_test_suppressions = [] +if cc.get_id() == 'gcc' + atom_test_suppressions += ['-Wno-stringop-overflow'] +endif + # Build and run tests foreach test_name : test_names test( @@ -151,8 +171,9 @@ foreach test_name : test_names executable( test_name, files('test_@0@.c'.format(test_name)), - c_args: c_suppressions, + c_args: c_suppressions + atom_test_suppressions, dependencies: [lv2_dep], + implicit_include_directories: false, ), suite: 'unit', ) |