Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2016-03-19 18:40:22 +0300
committerNirbheek Chauhan <nirbheek@centricular.com>2020-10-28 19:59:08 +0300
commitc2b542b6c02bafbe7a83b2eeec6cb5a0bfa3ed0d (patch)
treed788ad2c57bd1ccaae6aa73dced21c83c59df1b1 /tests
parent034c1b61a250457649d788bbf983b3f0fb63f02e (diff)
Add support for Meson build system
Tested on: - Linux/x86* with gcc - Android armv7 arm64 x86 x86_64 with clang - Windows x86 x86_64 with Visual Studio 2017 - Windows x86 x86_64 with MinGW - macOS x86_64 with clang - iOS arm64 x86_64 with clang Co-authored by: Nirbheek Chauhan <nirbheek@centricular.com> https://gitlab.xiph.org/xiph/opus/-/merge_requests/13
Diffstat (limited to 'tests')
-rw-r--r--tests/meson.build34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644
index 00000000..5f3ac9df
--- /dev/null
+++ b/tests/meson.build
@@ -0,0 +1,34 @@
+# Tests that link to libopus
+opus_tests = [
+ ['test_opus_api'],
+ ['test_opus_decode', [], 60],
+ ['test_opus_encode', 'opus_encode_regressions.c', 120],
+ ['test_opus_padding'],
+ ['test_opus_projection'],
+]
+
+foreach t : opus_tests
+ test_name = t.get(0)
+ extra_srcs = t.get(1, [])
+
+ test_kwargs = {}
+ if t.length() > 2
+ test_kwargs += {'timeout': t[2]}
+ endif
+
+ exe_kwargs = {}
+ # This test uses private symbols
+ if test_name == 'test_opus_projection'
+ exe_kwargs = {
+ 'link_with': [celt_lib, silk_lib],
+ 'objects': opus_lib.extract_all_objects(),
+ }
+ endif
+
+ exe = executable(test_name, '@0@.c'.format(test_name), extra_srcs,
+ include_directories: opus_includes,
+ dependencies: [libm, opus_dep],
+ install: false,
+ kwargs: exe_kwargs)
+ test(test_name, exe, kwargs: test_kwargs)
+endforeach