diff options
author | Matthew Waters <matthew@centricular.com> | 2020-06-25 22:11:33 +1000 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2020-06-25 22:11:33 +1000 |
commit | f5d94716397ad3a0780a1e6b70524269fce47c46 (patch) | |
tree | c13b6e00d148c785261b8736f1c51e8378afbed1 | |
parent | 204945b902b43fc4f902786bebc0d68944f1dd36 (diff) |
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>
-rw-r--r-- | webrtc/check/configure_test_check.py | 15 | ||||
-rw-r--r-- | webrtc/check/meson.build | 6 |
2 files changed, 20 insertions, 1 deletions
diff --git a/webrtc/check/configure_test_check.py b/webrtc/check/configure_test_check.py new file mode 100644 index 0000000..d7d56dd --- /dev/null +++ b/webrtc/check/configure_test_check.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 + +import os +import unittest +from selenium import webdriver +from selenium.webdriver.support.wait import WebDriverWait +from selenium.webdriver.firefox.firefox_profile import FirefoxProfile +from selenium.webdriver.chrome.options import Options as COptions +import asyncio +import threading +import signal + +import gi +gi.require_version('Gst', '1.0') +from gi.repository import Gst diff --git a/webrtc/check/meson.build b/webrtc/check/meson.build index a7f6456..15fc8bc 100644 --- a/webrtc/check/meson.build +++ b/webrtc/check/meson.build @@ -2,8 +2,12 @@ tests = [ ['basic', 'basic.py'], ] -if openssl.found() +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), |