gstreamer/webrtc/check/meson.build
Matthew Waters f5d9471639 webrtc/test: check if selenium is available before attempting to add tests
Fixes the following error

File "/builds/vivia/gst-plugins-bad/gst-build/build/../subprojects/gst-examples/webrtc/check/basic.py", line 5, in <module>
     from selenium import webdriver

ModuleNotFoundError: No module named 'selenium'
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/17>
2020-06-25 22:11:33 +10:00

22 lines
744 B
Meson

tests = [
['basic', 'basic.py'],
]
check_test = find_program ('configure_test_check.py')
have_webrtc_check_deps = run_command (check_test).returncode() == 0
if openssl.found() and have_webrtc_check_deps
test_deps = [certs]
message ('adding webrtc tests')
foreach elem : tests
test(elem.get(0),
py3,
depends: test_deps,
args : files(elem.get(1)),
# XXX: This PYTHONPATH hack is fun
env : ['PYTHONPATH=' + join_paths(meson.source_root(), 'sendrecv', 'gst') + ':' + join_paths(meson.source_root(), 'signalling'),
'TEST_HTML_SOURCE=' + join_paths(meson.source_root(), 'sendrecv', 'js'),
'TEST_CA_CERT_PATH=' + join_paths(meson.build_root(), 'signalling')])
endforeach
endif