Add support for launching webcam software for use in recipes
* Copy ensure_webcam_is_running.py from recipes repo * Turn it into a wrapper that can launch another script (fix_python_path is copied from test_env.py as _ForcePythonInterpreter) * Support it in mb.py * Add it to video_capture_unittests No-Try: True Bug: chromium:755660 Change-Id: I376724a77e443620724add7818592e9368d02079 Reviewed-on: https://webrtc-review.googlesource.com/77320 Commit-Queue: Oleh Prypin <oprypin@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23275}
This commit is contained in:
@ -844,18 +844,20 @@ class MetaBuildWrapper(object):
|
||||
else:
|
||||
extra_files = ['../../testing/test_env.py']
|
||||
|
||||
if isolate_map[target].get('use_webcam', False):
|
||||
cmdline.append('../../tools_webrtc/ensure_webcam_is_running.py')
|
||||
extra_files.append('../../tools_webrtc/ensure_webcam_is_running.py')
|
||||
|
||||
# This needs to mirror the settings in //build/config/ui.gni:
|
||||
# use_x11 = is_linux && !use_ozone.
|
||||
use_x11 = is_linux and not 'use_ozone=true' in vals['gn_args']
|
||||
|
||||
xvfb = use_x11 and test_type == 'windowed_test_launcher'
|
||||
if xvfb:
|
||||
extra_files += [
|
||||
'../../testing/xvfb.py',
|
||||
]
|
||||
|
||||
cmdline = (['../../testing/xvfb.py'] if xvfb else
|
||||
['../../testing/test_env.py'])
|
||||
cmdline.append('../../testing/xvfb.py')
|
||||
extra_files.append('../../testing/xvfb.py')
|
||||
else:
|
||||
cmdline.append('../../testing/test_env.py')
|
||||
|
||||
# Memcheck is only supported for linux. Ignore in other platforms.
|
||||
if is_linux and 'rtc_use_memcheck=true' in vals['gn_args']:
|
||||
|
||||
Reference in New Issue
Block a user