Use gtest_parallel for PipeWire tests.

This CL will also make PipeWire tests retried 3 times in case of failures.

Change-Id: I9c66351f7ee171e29266fe4b8dcd52ca282c8f6d
Bug: webrtc:14644
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282820
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38595}
This commit is contained in:
Jeremy Leconte 2022-11-09 14:45:04 +01:00 committed by WebRTC LUCI CQ
parent f4abcc0bbb
commit d957836794
8 changed files with 252 additions and 219 deletions

View File

@ -3409,6 +3409,27 @@
}, },
"test_id_prefix": "ninja://:rtc_unittests/" "test_id_prefix": "ninja://:rtc_unittests/"
}, },
{
"isolate_name": "shared_screencast_stream_test",
"merge": {
"args": [],
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "shared_screencast_stream_test",
"resultdb": {
"result_format": "json"
},
"swarming": {
"can_use_on_swarming_builders": true,
"dimension_sets": [
{
"cpu": "x86-64",
"os": "Ubuntu-18.04"
}
]
},
"test_id_prefix": "ninja://modules/desktop_capture:shared_screencast_stream_test/"
},
{ {
"isolate_name": "slow_peer_connection_unittests", "isolate_name": "slow_peer_connection_unittests",
"merge": { "merge": {
@ -4708,6 +4729,27 @@
}, },
"test_id_prefix": "ninja://:rtc_unittests/" "test_id_prefix": "ninja://:rtc_unittests/"
}, },
{
"isolate_name": "shared_screencast_stream_test",
"merge": {
"args": [],
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "shared_screencast_stream_test",
"resultdb": {
"result_format": "json"
},
"swarming": {
"can_use_on_swarming_builders": true,
"dimension_sets": [
{
"cpu": "x86-64",
"os": "Ubuntu-18.04"
}
]
},
"test_id_prefix": "ninja://modules/desktop_capture:shared_screencast_stream_test/"
},
{ {
"isolate_name": "slow_peer_connection_unittests", "isolate_name": "slow_peer_connection_unittests",
"merge": { "merge": {
@ -5141,6 +5183,27 @@
}, },
"test_id_prefix": "ninja://:rtc_unittests/" "test_id_prefix": "ninja://:rtc_unittests/"
}, },
{
"isolate_name": "shared_screencast_stream_test",
"merge": {
"args": [],
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "shared_screencast_stream_test",
"resultdb": {
"result_format": "json"
},
"swarming": {
"can_use_on_swarming_builders": true,
"dimension_sets": [
{
"cpu": "x86-64",
"os": "Ubuntu-18.04"
}
]
},
"test_id_prefix": "ninja://modules/desktop_capture:shared_screencast_stream_test/"
},
{ {
"isolate_name": "slow_peer_connection_unittests", "isolate_name": "slow_peer_connection_unittests",
"merge": { "merge": {
@ -6358,32 +6421,6 @@
}, },
"test_id_prefix": "ninja://pc:peerconnection_unittests/" "test_id_prefix": "ninja://pc:peerconnection_unittests/"
}, },
{
"args": [
".",
"--gtest_output=json:${ISOLATED_OUTDIR}/gtest_output.json"
],
"isolate_name": "pipewire_shared_screencast_stream_test",
"merge": {
"args": [],
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "pipewire_shared_screencast_stream_test",
"resultdb": {
"result_file": "${ISOLATED_OUTDIR}/gtest_output.json",
"result_format": "gtest_json"
},
"swarming": {
"can_use_on_swarming_builders": true,
"dimension_sets": [
{
"cpu": "x86-64",
"os": "Ubuntu-18.04"
}
]
},
"test_id_prefix": "ninja://modules/desktop_capture:pipewire_shared_screencast_stream_test/"
},
{ {
"isolate_name": "rtc_media_unittests", "isolate_name": "rtc_media_unittests",
"merge": { "merge": {
@ -6469,6 +6506,27 @@
}, },
"test_id_prefix": "ninja://:rtc_unittests/" "test_id_prefix": "ninja://:rtc_unittests/"
}, },
{
"isolate_name": "shared_screencast_stream_test",
"merge": {
"args": [],
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "shared_screencast_stream_test",
"resultdb": {
"result_format": "json"
},
"swarming": {
"can_use_on_swarming_builders": true,
"dimension_sets": [
{
"cpu": "x86-64",
"os": "Ubuntu-18.04"
}
]
},
"test_id_prefix": "ninja://modules/desktop_capture:shared_screencast_stream_test/"
},
{ {
"isolate_name": "slow_peer_connection_unittests", "isolate_name": "slow_peer_connection_unittests",
"merge": { "merge": {
@ -6818,32 +6876,6 @@
}, },
"test_id_prefix": "ninja://pc:peerconnection_unittests/" "test_id_prefix": "ninja://pc:peerconnection_unittests/"
}, },
{
"args": [
".",
"--gtest_output=json:${ISOLATED_OUTDIR}/gtest_output.json"
],
"isolate_name": "pipewire_shared_screencast_stream_test",
"merge": {
"args": [],
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "pipewire_shared_screencast_stream_test",
"resultdb": {
"result_file": "${ISOLATED_OUTDIR}/gtest_output.json",
"result_format": "gtest_json"
},
"swarming": {
"can_use_on_swarming_builders": true,
"dimension_sets": [
{
"cpu": "x86-64",
"os": "Ubuntu-18.04"
}
]
},
"test_id_prefix": "ninja://modules/desktop_capture:pipewire_shared_screencast_stream_test/"
},
{ {
"isolate_name": "rtc_media_unittests", "isolate_name": "rtc_media_unittests",
"merge": { "merge": {
@ -6929,6 +6961,27 @@
}, },
"test_id_prefix": "ninja://:rtc_unittests/" "test_id_prefix": "ninja://:rtc_unittests/"
}, },
{
"isolate_name": "shared_screencast_stream_test",
"merge": {
"args": [],
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "shared_screencast_stream_test",
"resultdb": {
"result_format": "json"
},
"swarming": {
"can_use_on_swarming_builders": true,
"dimension_sets": [
{
"cpu": "x86-64",
"os": "Ubuntu-18.04"
}
]
},
"test_id_prefix": "ninja://modules/desktop_capture:shared_screencast_stream_test/"
},
{ {
"isolate_name": "slow_peer_connection_unittests", "isolate_name": "slow_peer_connection_unittests",
"merge": { "merge": {

View File

@ -80,13 +80,10 @@
"label": "//pc:peerconnection_unittests", "label": "//pc:peerconnection_unittests",
"type": "console_test_launcher", "type": "console_test_launcher",
}, },
"pipewire_shared_screencast_stream_test": { "shared_screencast_stream_test": {
"label": "label": "//modules/desktop_capture:shared_screencast_stream_test",
"//modules/desktop_capture:pipewire_shared_screencast_stream_test", "type": "console_test_launcher",
"type": "use_pipewire": True,
"script",
"script":
"//modules/desktop_capture/linux/wayland/test/shared_screencast_stream_test.py",
}, },
"rtc_media_unittests": { "rtc_media_unittests": {
"label": "//media:rtc_media_unittests", "label": "//media:rtc_media_unittests",

View File

@ -184,10 +184,7 @@
'webrtc_nonparallel_tests': {}, 'webrtc_nonparallel_tests': {},
}, },
'linux_desktop_specific_tests': { 'linux_desktop_specific_tests': {
'pipewire_shared_screencast_stream_test': { 'shared_screencast_stream_test': {},
'args': ['.'],
'mixins': ['resultdb-gtest-json-format'],
},
}, },
'more_configs_tests': { 'more_configs_tests': {
'peerconnection_unittests': { 'peerconnection_unittests': {

View File

@ -6092,6 +6092,27 @@
}, },
"test_id_prefix": "ninja://:rtc_unittests/" "test_id_prefix": "ninja://:rtc_unittests/"
}, },
{
"isolate_name": "shared_screencast_stream_test",
"merge": {
"args": [],
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "shared_screencast_stream_test",
"resultdb": {
"result_format": "json"
},
"swarming": {
"can_use_on_swarming_builders": true,
"dimension_sets": [
{
"cpu": "x86-64",
"os": "Ubuntu-18.04"
}
]
},
"test_id_prefix": "ninja://modules/desktop_capture:shared_screencast_stream_test/"
},
{ {
"isolate_name": "slow_peer_connection_unittests", "isolate_name": "slow_peer_connection_unittests",
"merge": { "merge": {
@ -6446,32 +6467,6 @@
}, },
"test_id_prefix": "ninja://pc:peerconnection_unittests/" "test_id_prefix": "ninja://pc:peerconnection_unittests/"
}, },
{
"args": [
".",
"--gtest_output=json:${ISOLATED_OUTDIR}/gtest_output.json"
],
"isolate_name": "pipewire_shared_screencast_stream_test",
"merge": {
"args": [],
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "pipewire_shared_screencast_stream_test",
"resultdb": {
"result_file": "${ISOLATED_OUTDIR}/gtest_output.json",
"result_format": "gtest_json"
},
"swarming": {
"can_use_on_swarming_builders": true,
"dimension_sets": [
{
"cpu": "x86-64",
"os": "Ubuntu-18.04"
}
]
},
"test_id_prefix": "ninja://modules/desktop_capture:pipewire_shared_screencast_stream_test/"
},
{ {
"isolate_name": "rtc_media_unittests", "isolate_name": "rtc_media_unittests",
"merge": { "merge": {
@ -6557,6 +6552,27 @@
}, },
"test_id_prefix": "ninja://:rtc_unittests/" "test_id_prefix": "ninja://:rtc_unittests/"
}, },
{
"isolate_name": "shared_screencast_stream_test",
"merge": {
"args": [],
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "shared_screencast_stream_test",
"resultdb": {
"result_format": "json"
},
"swarming": {
"can_use_on_swarming_builders": true,
"dimension_sets": [
{
"cpu": "x86-64",
"os": "Ubuntu-18.04"
}
]
},
"test_id_prefix": "ninja://modules/desktop_capture:shared_screencast_stream_test/"
},
{ {
"isolate_name": "slow_peer_connection_unittests", "isolate_name": "slow_peer_connection_unittests",
"merge": { "merge": {
@ -6906,32 +6922,6 @@
}, },
"test_id_prefix": "ninja://pc:peerconnection_unittests/" "test_id_prefix": "ninja://pc:peerconnection_unittests/"
}, },
{
"args": [
".",
"--gtest_output=json:${ISOLATED_OUTDIR}/gtest_output.json"
],
"isolate_name": "pipewire_shared_screencast_stream_test",
"merge": {
"args": [],
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "pipewire_shared_screencast_stream_test",
"resultdb": {
"result_file": "${ISOLATED_OUTDIR}/gtest_output.json",
"result_format": "gtest_json"
},
"swarming": {
"can_use_on_swarming_builders": true,
"dimension_sets": [
{
"cpu": "x86-64",
"os": "Ubuntu-18.04"
}
]
},
"test_id_prefix": "ninja://modules/desktop_capture:pipewire_shared_screencast_stream_test/"
},
{ {
"isolate_name": "rtc_media_unittests", "isolate_name": "rtc_media_unittests",
"merge": { "merge": {
@ -7017,6 +7007,27 @@
}, },
"test_id_prefix": "ninja://:rtc_unittests/" "test_id_prefix": "ninja://:rtc_unittests/"
}, },
{
"isolate_name": "shared_screencast_stream_test",
"merge": {
"args": [],
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "shared_screencast_stream_test",
"resultdb": {
"result_format": "json"
},
"swarming": {
"can_use_on_swarming_builders": true,
"dimension_sets": [
{
"cpu": "x86-64",
"os": "Ubuntu-18.04"
}
]
},
"test_id_prefix": "ninja://modules/desktop_capture:shared_screencast_stream_test/"
},
{ {
"isolate_name": "slow_peer_connection_unittests", "isolate_name": "slow_peer_connection_unittests",
"merge": { "merge": {
@ -7824,32 +7835,6 @@
}, },
"test_id_prefix": "ninja://pc:peerconnection_unittests/" "test_id_prefix": "ninja://pc:peerconnection_unittests/"
}, },
{
"args": [
".",
"--gtest_output=json:${ISOLATED_OUTDIR}/gtest_output.json"
],
"isolate_name": "pipewire_shared_screencast_stream_test",
"merge": {
"args": [],
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "pipewire_shared_screencast_stream_test",
"resultdb": {
"result_file": "${ISOLATED_OUTDIR}/gtest_output.json",
"result_format": "gtest_json"
},
"swarming": {
"can_use_on_swarming_builders": true,
"dimension_sets": [
{
"cpu": "x86-64",
"os": "Ubuntu-18.04"
}
]
},
"test_id_prefix": "ninja://modules/desktop_capture:pipewire_shared_screencast_stream_test/"
},
{ {
"isolate_name": "rtc_media_unittests", "isolate_name": "rtc_media_unittests",
"merge": { "merge": {
@ -7935,6 +7920,27 @@
}, },
"test_id_prefix": "ninja://:rtc_unittests/" "test_id_prefix": "ninja://:rtc_unittests/"
}, },
{
"isolate_name": "shared_screencast_stream_test",
"merge": {
"args": [],
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "shared_screencast_stream_test",
"resultdb": {
"result_format": "json"
},
"swarming": {
"can_use_on_swarming_builders": true,
"dimension_sets": [
{
"cpu": "x86-64",
"os": "Ubuntu-18.04"
}
]
},
"test_id_prefix": "ninja://modules/desktop_capture:shared_screencast_stream_test/"
},
{ {
"isolate_name": "slow_peer_connection_unittests", "isolate_name": "slow_peer_connection_unittests",
"merge": { "merge": {
@ -8850,6 +8856,27 @@
}, },
"test_id_prefix": "ninja://:rtc_unittests/" "test_id_prefix": "ninja://:rtc_unittests/"
}, },
{
"isolate_name": "shared_screencast_stream_test",
"merge": {
"args": [],
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "shared_screencast_stream_test",
"resultdb": {
"result_format": "json"
},
"swarming": {
"can_use_on_swarming_builders": true,
"dimension_sets": [
{
"cpu": "x86-64",
"os": "Ubuntu-18.04"
}
]
},
"test_id_prefix": "ninja://modules/desktop_capture:shared_screencast_stream_test/"
},
{ {
"isolate_name": "slow_peer_connection_unittests", "isolate_name": "slow_peer_connection_unittests",
"merge": { "merge": {
@ -9283,6 +9310,27 @@
}, },
"test_id_prefix": "ninja://:rtc_unittests/" "test_id_prefix": "ninja://:rtc_unittests/"
}, },
{
"isolate_name": "shared_screencast_stream_test",
"merge": {
"args": [],
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "shared_screencast_stream_test",
"resultdb": {
"result_format": "json"
},
"swarming": {
"can_use_on_swarming_builders": true,
"dimension_sets": [
{
"cpu": "x86-64",
"os": "Ubuntu-18.04"
}
]
},
"test_id_prefix": "ninja://modules/desktop_capture:shared_screencast_stream_test/"
},
{ {
"isolate_name": "slow_peer_connection_unittests", "isolate_name": "slow_peer_connection_unittests",
"merge": { "merge": {

View File

@ -83,9 +83,7 @@
'os_type': 'linux', 'os_type': 'linux',
'mixins': ['linux-bionic', 'x86-64', 'resultdb-json-format'], 'mixins': ['linux-bionic', 'x86-64', 'resultdb-json-format'],
'test_suites': { 'test_suites': {
# TODO(crbug.com/webrtc/14644): Replace desktop_tests by linux_tests 'isolated_scripts': 'linux_tests',
# when the failing pipewire tests are ignored on sanitizers.
'isolated_scripts': 'desktop_tests',
}, },
}, },
'Linux MSan': { 'Linux MSan': {
@ -95,8 +93,6 @@
# TODO(crbug.com/webrtc/14568): Using 'linux_tests' # TODO(crbug.com/webrtc/14568): Using 'linux_tests'
# fails on "MemorySanitizer: use-of-uninitialized-value in # fails on "MemorySanitizer: use-of-uninitialized-value in
# libpipewire-0.3.so." # libpipewire-0.3.so."
# TODO(crbug.com/webrtc/14644): Replace desktop_tests by linux_tests
# when the failing pipewire tests are ignored on sanitizers.
'isolated_scripts': 'desktop_tests', 'isolated_scripts': 'desktop_tests',
}, },
}, },
@ -107,8 +103,6 @@
# TODO(crbug.com/webrtc/14568): Using 'linux_tests' # TODO(crbug.com/webrtc/14568): Using 'linux_tests'
# fails on "ThreadSanitizer: data race on vptr (ctor/dtor vs # fails on "ThreadSanitizer: data race on vptr (ctor/dtor vs
# virtual call) in shared_screencast_stream_test." # virtual call) in shared_screencast_stream_test."
# TODO(crbug.com/webrtc/14644): Replace desktop_tests by linux_tests
# when the failing pipewire tests are ignored on sanitizers.
'isolated_scripts': 'desktop_tests', 'isolated_scripts': 'desktop_tests',
}, },
}, },
@ -116,18 +110,14 @@
'os_type': 'linux', 'os_type': 'linux',
'mixins': ['linux-bionic', 'x86-64', 'resultdb-json-format'], 'mixins': ['linux-bionic', 'x86-64', 'resultdb-json-format'],
'test_suites': { 'test_suites': {
# TODO(crbug.com/webrtc/14644): Replace desktop_tests by linux_tests 'isolated_scripts': 'linux_tests',
# when the failing pipewire tests are ignored on sanitizers.
'isolated_scripts': 'desktop_tests',
}, },
}, },
'Linux UBSan vptr': { 'Linux UBSan vptr': {
'os_type': 'linux', 'os_type': 'linux',
'mixins': ['linux-bionic', 'x86-64', 'resultdb-json-format'], 'mixins': ['linux-bionic', 'x86-64', 'resultdb-json-format'],
'test_suites': { 'test_suites': {
# TODO(crbug.com/webrtc/14644): Replace desktop_tests by linux_tests 'isolated_scripts': 'linux_tests',
# when the failing pipewire tests are ignored on sanitizers.
'isolated_scripts': 'desktop_tests',
}, },
}, },
'Linux32 Debug': { 'Linux32 Debug': {
@ -509,9 +499,7 @@
'os_type': 'linux', 'os_type': 'linux',
'mixins': ['linux-bionic', 'x86-64', 'resultdb-json-format'], 'mixins': ['linux-bionic', 'x86-64', 'resultdb-json-format'],
'test_suites': { 'test_suites': {
# TODO(crbug.com/webrtc/14644): Replace desktop_tests by linux_tests 'isolated_scripts': 'linux_tests',
# when the failing pipewire tests are ignored on sanitizers.
'isolated_scripts': 'desktop_tests',
}, },
}, },
'linux_compile_arm64_dbg': {}, 'linux_compile_arm64_dbg': {},
@ -549,8 +537,6 @@
# TODO(crbug.com/webrtc/14568): Using 'linux_tests' # TODO(crbug.com/webrtc/14568): Using 'linux_tests'
# fails on "MemorySanitizer: use-of-uninitialized-value in # fails on "MemorySanitizer: use-of-uninitialized-value in
# libpipewire-0.3.so." # libpipewire-0.3.so."
# TODO(crbug.com/webrtc/14644): Replace desktop_tests by linux_tests
# when the failing pipewire tests are ignored on sanitizers.
'isolated_scripts': 'desktop_tests', 'isolated_scripts': 'desktop_tests',
}, },
}, },
@ -568,8 +554,6 @@
# TODO(crbug.com/webrtc/14568): Using 'linux_tests' # TODO(crbug.com/webrtc/14568): Using 'linux_tests'
# fails on "ThreadSanitizer: data race on vptr (ctor/dtor vs # fails on "ThreadSanitizer: data race on vptr (ctor/dtor vs
# virtual call) in shared_screencast_stream_test." # virtual call) in shared_screencast_stream_test."
# TODO(crbug.com/webrtc/14644): Replace desktop_tests by linux_tests
# when the failing pipewire tests are ignored on sanitizers.
'isolated_scripts': 'desktop_tests', 'isolated_scripts': 'desktop_tests',
}, },
}, },
@ -577,18 +561,14 @@
'os_type': 'linux', 'os_type': 'linux',
'mixins': ['linux-bionic', 'x86-64', 'resultdb-json-format'], 'mixins': ['linux-bionic', 'x86-64', 'resultdb-json-format'],
'test_suites': { 'test_suites': {
# TODO(crbug.com/webrtc/14644): Replace desktop_tests by linux_tests 'isolated_scripts': 'linux_tests',
# when the failing pipewire tests are ignored on sanitizers.
'isolated_scripts': 'desktop_tests',
}, },
}, },
'linux_ubsan_vptr': { 'linux_ubsan_vptr': {
'os_type': 'linux', 'os_type': 'linux',
'mixins': ['linux-bionic', 'x86-64', 'resultdb-json-format'], 'mixins': ['linux-bionic', 'x86-64', 'resultdb-json-format'],
'test_suites': { 'test_suites': {
# TODO(crbug.com/webrtc/14644): Replace desktop_tests by linux_tests 'isolated_scripts': 'linux_tests',
# when the failing pipewire tests are ignored on sanitizers.
'isolated_scripts': 'desktop_tests',
}, },
}, },
'linux_x86_dbg': { 'linux_x86_dbg': {

View File

@ -139,20 +139,9 @@ if (rtc_include_tests) {
deps += [ ":pipewire_stubs" ] deps += [ ":pipewire_stubs" ]
} }
data = [ "../../third_party/pipewire" ]
public_configs = [ ":pipewire_config" ] public_configs = [ ":pipewire_config" ]
} }
group("pipewire_shared_screencast_stream_test") {
testonly = true
deps = [ ":shared_screencast_stream_test" ]
data = [
"../../third_party/pipewire",
"linux/wayland/test/shared_screencast_stream_test.py",
"${root_out_dir}/shared_screencast_stream_test",
]
}
} }
rtc_library("desktop_capture_unittests") { rtc_library("desktop_capture_unittests") {

View File

@ -7,43 +7,19 @@
# in the file PATENTS. All contributing project authors may # in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree. # be found in the AUTHORS file in the root of the source tree.
""" """
This script is the wrapper that runs the "shared_screencast_screen" test. This script is a wrapper that loads "pipewire" library.
""" """
import argparse
import json
import os import os
import subprocess import subprocess
import sys import sys
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) _SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
# Get rid of "modules/desktop_capture/linux/wayland/test" _SRC_DIR = os.path.dirname(_SCRIPT_DIR)
ROOT_DIR = os.path.normpath(
os.path.join(SCRIPT_DIR, os.pardir, os.pardir, os.pardir, os.pardir,
os.pardir))
def _ParseArgs():
parser = argparse.ArgumentParser(
description='Run shared_screencast_screen test.')
parser.add_argument('build_dir',
help='Path to the build directory (e.g. out/Release).')
parser.add_argument(
'--isolated-script-test-output',
default=None,
help='Path to output JSON file which Chromium infra requires.')
# Unused args
# We just need to avoid passing these to the test
parser.add_argument(
'--isolated-script-test-perf-output',
default=None,
help='Path to store perf results in histogram proto format.')
return parser.parse_known_args()
def _GetPipeWireDir(): def _GetPipeWireDir():
pipewire_dir = os.path.join(ROOT_DIR, 'third_party', 'pipewire', pipewire_dir = os.path.join(_SRC_DIR, 'third_party', 'pipewire',
'linux-amd64') 'linux-amd64')
if not os.path.isdir(pipewire_dir): if not os.path.isdir(pipewire_dir):
@ -72,11 +48,10 @@ def _ConfigurePipeWirePaths(path):
def main(): def main():
args, extra_args = _ParseArgs()
pipewire_dir = _GetPipeWireDir() pipewire_dir = _GetPipeWireDir()
if pipewire_dir is None: if pipewire_dir is None:
print('configure-pipewire: Couldn\'t find directory %s' % pipewire_dir)
return 1 return 1
_ConfigurePipeWirePaths(pipewire_dir) _ConfigurePipeWirePaths(pipewire_dir)
@ -85,20 +60,11 @@ def main():
pipewire_media_session_process = subprocess.Popen(["pipewire-media-session"], pipewire_media_session_process = subprocess.Popen(["pipewire-media-session"],
stdout=None) stdout=None)
test_command = os.path.join(args.build_dir, 'shared_screencast_stream_test') return_value = subprocess.call(sys.argv[1:])
pipewire_test_process = subprocess.run([test_command] + extra_args,
stdout=True,
check=False)
return_value = pipewire_test_process.returncode
pipewire_media_session_process.terminate() pipewire_media_session_process.terminate()
pipewire_process.terminate() pipewire_process.terminate()
if args.isolated_script_test_output:
with open(args.isolated_script_test_output, 'w') as f:
json.dump({"version": 3}, f)
return return_value return return_value

View File

@ -102,6 +102,9 @@ class WebRTCMetaBuildWrapper(mb.MetaBuildWrapper):
vpython_exe, '../../tools_webrtc/ensure_webcam_is_running.py' vpython_exe, '../../tools_webrtc/ensure_webcam_is_running.py'
] ]
extra_files.append('../../tools_webrtc/ensure_webcam_is_running.py') extra_files.append('../../tools_webrtc/ensure_webcam_is_running.py')
if isolate_map[target].get('use_pipewire', False):
cmdline += [vpython_exe, '../../tools_webrtc/configure_pipewire.py']
extra_files.append('../../tools_webrtc/configure_pipewire.py')
# is_linux uses use_ozone and x11 by default. # is_linux uses use_ozone and x11 by default.
use_x11 = is_linux use_x11 = is_linux