mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 14:06:23 +00:00
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>
This commit is contained in:
parent
204945b902
commit
f5d9471639
2 changed files with 20 additions and 1 deletions
15
webrtc/check/configure_test_check.py
Normal file
15
webrtc/check/configure_test_check.py
Normal file
|
@ -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
|
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue