diff options
author | David Robillard <d@drobilla.net> | 2022-03-13 12:43:18 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-03-13 12:43:18 -0400 |
commit | 32676ade3aefddf20a8676fff6ff2a63401f1ed3 (patch) | |
tree | ae2cabcacd9e85b8705d49bd44bff77f0fdbe220 /test | |
parent | 0874708b44e2b01639c507b9c18aa3cbfa5e7e89 (diff) | |
download | lilv-32676ade3aefddf20a8676fff6ff2a63401f1ed3.tar.gz lilv-32676ade3aefddf20a8676fff6ff2a63401f1ed3.tar.bz2 lilv-32676ade3aefddf20a8676fff6ff2a63401f1ed3.zip |
Fix Windows build
Diffstat (limited to 'test')
-rw-r--r-- | test/bad_syntax.lv2/meson.build | 2 | ||||
-rw-r--r-- | test/failed_instantiation.lv2/meson.build | 2 | ||||
-rw-r--r-- | test/failed_lib_descriptor.lv2/meson.build | 2 | ||||
-rw-r--r-- | test/lib_descriptor.lv2/meson.build | 2 | ||||
-rw-r--r-- | test/lilv_test_utils.c | 2 | ||||
-rw-r--r-- | test/meson.build | 13 | ||||
-rw-r--r-- | test/missing_descriptor.lv2/meson.build | 2 | ||||
-rw-r--r-- | test/missing_name.lv2/meson.build | 2 | ||||
-rw-r--r-- | test/missing_plugin.lv2/meson.build | 2 | ||||
-rw-r--r-- | test/missing_port.lv2/meson.build | 2 | ||||
-rw-r--r-- | test/missing_port_name.lv2/meson.build | 2 | ||||
-rw-r--r-- | test/test_state.c | 2 |
12 files changed, 23 insertions, 12 deletions
diff --git a/test/bad_syntax.lv2/meson.build b/test/bad_syntax.lv2/meson.build index 07e96d7..1b21dfd 100644 --- a/test/bad_syntax.lv2/meson.build +++ b/test/bad_syntax.lv2/meson.build @@ -17,7 +17,7 @@ endforeach test('bad_syntax', executable('test_bad_syntax', 'test_bad_syntax.c', - c_args: prog_args, + c_args: prog_args + ['-DLILV_STATIC'], dependencies: [lv2_dep, lilv_static_dep]), args: [meson.current_build_dir() / ''], suite: 'plugin') diff --git a/test/failed_instantiation.lv2/meson.build b/test/failed_instantiation.lv2/meson.build index 2221b4f..e9b0119 100644 --- a/test/failed_instantiation.lv2/meson.build +++ b/test/failed_instantiation.lv2/meson.build @@ -17,7 +17,7 @@ endforeach test('failed_instantiation', executable('test_failed_instantiation', 'test_failed_instantiation.c', - c_args: prog_args, + c_args: prog_args + ['-DLILV_STATIC'], dependencies: [lv2_dep, lilv_static_dep]), args: [meson.current_build_dir() / ''], suite: 'plugin') diff --git a/test/failed_lib_descriptor.lv2/meson.build b/test/failed_lib_descriptor.lv2/meson.build index b4c37f4..c601b06 100644 --- a/test/failed_lib_descriptor.lv2/meson.build +++ b/test/failed_lib_descriptor.lv2/meson.build @@ -17,7 +17,7 @@ endforeach test('failed_lib_descriptor', executable('test_failed_lib_descriptor', 'test_failed_lib_descriptor.c', - c_args: prog_args, + c_args: prog_args + ['-DLILV_STATIC'], dependencies: [lv2_dep, lilv_static_dep]), args: [meson.current_build_dir() / ''], suite: 'plugin') diff --git a/test/lib_descriptor.lv2/meson.build b/test/lib_descriptor.lv2/meson.build index 9006dfc..15d83f8 100644 --- a/test/lib_descriptor.lv2/meson.build +++ b/test/lib_descriptor.lv2/meson.build @@ -17,7 +17,7 @@ endforeach test('lib_descriptor', executable('test_lib_descriptor', 'test_lib_descriptor.c', - c_args: prog_args, + c_args: prog_args + ['-DLILV_STATIC'], dependencies: [lv2_dep, lilv_static_dep]), args: [meson.current_build_dir() / ''], suite: 'plugin') diff --git a/test/lilv_test_utils.c b/test/lilv_test_utils.c index fa79165..bfd3775 100644 --- a/test/lilv_test_utils.c +++ b/test/lilv_test_utils.c @@ -163,7 +163,7 @@ delete_bundle(LilvTestEnv* env) free(env->test_content_path); free(env->test_manifest_path); - free(env->test_bundle_uri); + serd_node_free(NULL, env->test_bundle_uri); free(env->test_bundle_path); env->test_content_path = NULL; diff --git a/test/meson.build b/test/meson.build index 597b765..775d3e9 100644 --- a/test/meson.build +++ b/test/meson.build @@ -46,13 +46,22 @@ define_args = [ '-DLILV_TEST_DIR="@0@/"'.format(meson.current_build_dir()), ] +test_args = prog_args + define_args + ['-DLILV_STATIC'] +if cc.get_id() == 'msvc' + test_args += [ + '/wd4191', # Unsafe conversion from 'FARPROC' + '/wd4464', # Relative include path contains '..' + '/wd5045', # Compiler will insert Spectre mitigation for memory load + ] +endif + foreach unit : unit_tests test(unit, executable('test_@0@'.format(unit), ['lilv_test_utils.c', 'test_@0@.c'.format(unit)], - c_args: prog_args + define_args, + c_args: test_args, include_directories: include_directories(['../src']), - dependencies: [lv2_dep, lilv_static_dep]), + dependencies: [lv2_dep, serd_dep, lilv_static_dep]), suite: 'unit') endforeach diff --git a/test/missing_descriptor.lv2/meson.build b/test/missing_descriptor.lv2/meson.build index 2112a99..cd21725 100644 --- a/test/missing_descriptor.lv2/meson.build +++ b/test/missing_descriptor.lv2/meson.build @@ -17,7 +17,7 @@ endforeach test('missing_descriptor', executable('test_missing_descriptor', 'test_missing_descriptor.c', - c_args: prog_args, + c_args: prog_args + ['-DLILV_STATIC'], dependencies: [lv2_dep, lilv_static_dep]), args: [meson.current_build_dir() / ''], suite: 'plugin') diff --git a/test/missing_name.lv2/meson.build b/test/missing_name.lv2/meson.build index 02979be..9897f70 100644 --- a/test/missing_name.lv2/meson.build +++ b/test/missing_name.lv2/meson.build @@ -17,7 +17,7 @@ endforeach test('missing_name', executable('test_missing_name', 'test_missing_name.c', - c_args: prog_args, + c_args: prog_args + ['-DLILV_STATIC'], dependencies: [lv2_dep, lilv_static_dep]), args: [meson.current_build_dir() / ''], suite: 'plugin') diff --git a/test/missing_plugin.lv2/meson.build b/test/missing_plugin.lv2/meson.build index 7197a33..40bbde2 100644 --- a/test/missing_plugin.lv2/meson.build +++ b/test/missing_plugin.lv2/meson.build @@ -17,7 +17,7 @@ endforeach test('missing_plugin', executable('test_missing_plugin', 'test_missing_plugin.c', - c_args: prog_args, + c_args: prog_args + ['-DLILV_STATIC'], dependencies: [lv2_dep, lilv_static_dep]), args: [meson.current_build_dir() / ''], suite: 'plugin') diff --git a/test/missing_port.lv2/meson.build b/test/missing_port.lv2/meson.build index c3f5461..f417de6 100644 --- a/test/missing_port.lv2/meson.build +++ b/test/missing_port.lv2/meson.build @@ -17,7 +17,7 @@ endforeach test('missing_port', executable('test_missing_port', 'test_missing_port.c', - c_args: prog_args, + c_args: prog_args + ['-DLILV_STATIC'], dependencies: [lv2_dep, lilv_static_dep]), args: [meson.current_build_dir() / ''], suite: 'plugin') diff --git a/test/missing_port_name.lv2/meson.build b/test/missing_port_name.lv2/meson.build index 806370b..dc69497 100644 --- a/test/missing_port_name.lv2/meson.build +++ b/test/missing_port_name.lv2/meson.build @@ -17,7 +17,7 @@ endforeach test('missing_port_name', executable('test_missing_port_name', 'test_missing_port_name.c', - c_args: prog_args, + c_args: prog_args + ['-DLILV_STATIC'], dependencies: [lv2_dep, lilv_static_dep]), args: [meson.current_build_dir() / ''], suite: 'plugin') diff --git a/test/test_state.c b/test/test_state.c index 5515382..1473584 100644 --- a/test/test_state.c +++ b/test/test_state.c @@ -562,7 +562,9 @@ count_statements(const char* path) SerdStatus st = SERD_SUCCESS; assert(!(st = serd_reader_start(reader, &in, NULL, 4096))); assert(!(st = serd_reader_read_document(reader))); + assert(!(st = serd_reader_finish(reader))); + serd_reader_free(reader); serd_close_input(&in); serd_sink_free(sink); serd_env_free(env); |