meson.build 833 B

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