summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungha Yang <seungha.yang@navercorp.com>2018-12-07 23:39:01 +0900
committerSeungha Yang <seungha.yang@navercorp.com>2018-12-18 22:48:01 +0900
commitf89fc3441ba97b4bebf23ff018a3b5abf12c57cf (patch)
tree46b0513602782b7e293ce15acc3296eb0e92e491
parent43290a9be2adb41392ac3d46f4bd9f997bbe3e6a (diff)
tests: Enable unit test on Windows
Remove hard-coded ':' whitelist separator since it varies with OS
-rw-r--r--meson.build4
-rw-r--r--tests/check/meson.build16
-rw-r--r--tests/meson.build6
3 files changed, 14 insertions, 12 deletions
diff --git a/meson.build b/meson.build
index e45b75d9..e6700157 100644
--- a/meson.build
+++ b/meson.build
@@ -141,11 +141,9 @@ gstsdp_dep = dependency('gstreamer-sdp-1.0', version : gst_req,
fallback : ['gst-plugins-base', 'sdp_dep'])
gstrtsp_dep = dependency('gstreamer-rtsp-1.0', version : gst_req,
fallback : ['gst-plugins-base', 'rtsp_dep'])
-if host_machine.system() != 'windows'
- gstcheck_dep = dependency('gstreamer-check-1.0', version : gst_req,
+gstcheck_dep = dependency('gstreamer-check-1.0', version : gst_req,
required : get_option('tests'),
fallback : ['gstreamer', 'gst_check_dep'])
-endif
gstcontroller_dep = dependency('gstreamer-controller-1.0', version : gst_req,
fallback : ['gstreamer', 'gst_controller_dep'])
diff --git a/tests/check/meson.build b/tests/check/meson.build
index 8887f62b..d7678c91 100644
--- a/tests/check/meson.build
+++ b/tests/check/meson.build
@@ -1,12 +1,18 @@
# name, condition when to skip the test and extra dependencies
ugly_tests = [
- [ 'elements/amrnbenc', not amrnb_dep.found() ],
- [ 'elements/mpeg2dec', not mpeg2_dep.found(), [ gstvideo_dep ] ],
- [ 'elements/x264enc', not x264_dep.found() ],
[ 'elements/xingmux' ],
- [ 'generic/states' ],
]
+# FIXME: unistd dependency or not tested yet on windows
+if host_machine.system() != 'windows'
+ ugly_tests += [
+ [ 'elements/amrnbenc', not amrnb_dep.found() ],
+ [ 'elements/mpeg2dec', not mpeg2_dep.found() or not cdata.has('HAVE_UNISTD_H'), [ gstvideo_dep ] ],
+ [ 'elements/x264enc', not x264_dep.found() or not cdata.has('HAVE_UNISTD_H') ],
+ [ 'generic/states', not cdata.has('HAVE_UNISTD_H') ],
+ ]
+endif
+
test_defines = [
'-UG_DISABLE_ASSERT',
'-UG_DISABLE_CAST_CHECKS',
@@ -61,7 +67,7 @@ foreach t : ugly_tests
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
env.set('CK_DEFAULT_TIMEOUT', '20')
env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer', 'gst-plugins-base',
- 'gst-plugins-good', 'gst-plugins-ugly@' + meson.build_root(), separator: ':')
+ 'gst-plugins-good', 'gst-plugins-ugly@' + meson.build_root())
env.set('GST_PLUGIN_PATH_1_0', [meson.build_root()] + pluginsdirs)
env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name))
test(test_name, exe, env: env, timeout: 3 * 60)
diff --git a/tests/meson.build b/tests/meson.build
index 1cc032c2..3714641a 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,5 +1,3 @@
-if host_machine.system() != 'windows'
- if not get_option('tests').disabled() and gstcheck_dep.found()
- subdir('check')
- endif
+if not get_option('tests').disabled() and gstcheck_dep.found()
+ subdir('check')
endif