1# Tests that link to libopus 2opus_tests = [ 3 ['test_opus_api'], 4 ['test_opus_decode', [], 120], 5 ['test_opus_encode', 'opus_encode_regressions.c', 240], 6 ['test_opus_extensions', [], 120], 7 ['test_opus_padding'], 8 ['test_opus_projection'], 9] 10 11foreach t : opus_tests 12 test_name = t.get(0) 13 extra_srcs = t.get(1, []) 14 15 test_kwargs = {} 16 if t.length() > 2 17 test_kwargs += {'timeout': t[2]} 18 endif 19 20 exe_kwargs = {} 21 # This test uses private symbols 22 if test_name == 'test_opus_projection' or test_name == 'test_opus_extensions' 23 exe_kwargs = { 24 'link_with': [celt_lib, silk_lib, dnn_lib], 25 'objects': opus_lib.extract_all_objects(), 26 } 27 endif 28 29 exe = executable(test_name, '@[email protected]'.format(test_name), extra_srcs, 30 include_directories: opus_includes, 31 dependencies: [libm, opus_dep], 32 install: false, 33 kwargs: exe_kwargs) 34 test(test_name, exe, kwargs: test_kwargs) 35endforeach 36