Browse Source

meson: add compat tests

Just as with autotools it may not test the actual compat version of a function,
but the one provided by the toolchain. That allows validating the tests
with the real thing.
pull/177/head
Steve Lhomme 1 year ago
parent
commit
7254c2dfc3
  1. 46
      compat/meson.build

46
compat/meson.build

@ -11,3 +11,49 @@ if libcompat_sources.length() > 0
install_dir: get_option('libdir') / 'vlc'
)
endif
heap_alloc_env = environment({'ASAN_OPTIONS': 'allocator_may_return_null=1'})
vlc_tests += {
'name': 'heap',
'sources': files('test/heap.c'),
'suite': ['compat'],
'link_with': [vlc_libcompat],
'env': heap_alloc_env,
}
vlc_tests += {
'name': 'strnstr',
'sources': files('test/strnstr.c'),
'suite': ['compat'],
'link_with': [vlc_libcompat],
}
vlc_tests += {
'name': 'ckd_ckd',
'sources': files('test/ckd.c'),
'c_args': ['-DTEST_CKD'],
'suite': ['compat'],
'link_with': [vlc_libcompat],
}
ckd_builtin_cargs = ['-DTEST_BUILTIN']
if cdata.has('HAVE_STDCKDINT_H')
ckd_builtin_cargs += '-DHAVE_CKD'
endif
vlc_tests += {
'name': 'ckd_builtin',
'sources': files('test/ckd.c'),
'c_args': ckd_builtin_cargs,
'suite': ['compat'],
'link_with': [vlc_libcompat],
}
vlc_tests += {
'name': 'ckd_compat',
'sources': files('test/ckd.c'),
'c_args': ['-DTEST_COMPAT'],
'suite': ['compat'],
'link_with': [vlc_libcompat],
}
#TODO: add clock_nanosleep test for Darwin

Loading…
Cancel
Save