tests: Enable hls m3u8 unit test with meson build
authorSeungha Yang <seungha.yang@navercorp.com>
Sun, 12 May 2019 10:21:23 +0000 (19:21 +0900)
committerSebastian Dröge <slomo@coaxion.net>
Tue, 18 Jun 2019 07:14:28 +0000 (07:14 +0000)
ext/hls/meson.build
tests/check/elements/hlsdemux_m3u8.c
tests/check/meson.build

index 0d33327..8487adb 100644 (file)
@@ -12,6 +12,8 @@ hls_cargs = ['-DGST_USE_UNSTABLE_API']
 
 hls_crypto = get_option('hls-crypto')
 hls_option = get_option('hls')
+# used for unit test
+hls_dep = dependency('', required : false)
 
 have_hls_crypto = false
 if not hls_option.disabled()
@@ -62,4 +64,5 @@ if have_hls_crypto
   )
   pkgconfig.generate(gsthls, install_dir : plugins_pkgconfig_install_dir)
   plugins += [gsthls]
+  hls_dep = declare_dependency(include_directories : include_directories('.'))
 endif
index a77aca1..cd732ef 100644 (file)
@@ -22,8 +22,6 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include <unistd.h>
-
 #include <gst/check/gstcheck.h>
 
 #undef GST_CAT_DEFAULT
index 651d3f5..fa3b9fc 100644 (file)
@@ -35,6 +35,7 @@ base_tests = [
   [['elements/gdppay.c']],
   [['elements/h263parse.c'], false, [libparser_dep, gstcodecparsers_dep]],
   [['elements/h264parse.c'], false, [libparser_dep, gstcodecparsers_dep]],
+  [['elements/hlsdemux_m3u8.c'], not hls_dep.found(), [hls_dep]],
   [['elements/id3mux.c']],
   [['elements/mpegtsmux.c'], false, [gstmpegts_dep]],
   [['elements/mpeg4videoparse.c'], false, [libparser_dep, gstcodecparsers_dep]],