From bddfa1d9de370cb98cf023965c060d37110a6413 Mon Sep 17 00:00:00 2001 From: Jeremy Leconte Date: Tue, 29 Mar 2022 10:48:04 +0200 Subject: [PATCH] Prepare the code to inherit from chromium's mb.py (3rd attempt). Basically try to make low_bandwidth_audio_perf_test target work with chromium's mb. Bug: webrtc:13867 Change-Id: If111e2b0f4f82935062d6321f4d16cc72c77d572 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256975 Reviewed-by: Mirko Bonadei Commit-Queue: Jeremy Leconte Cr-Commit-Position: refs/heads/main@{#36364} --- audio/BUILD.gn | 6 ------ tools_webrtc/mb/gn_isolate_map.pyl | 2 +- tools_webrtc/mb/mb.py | 10 +++++----- tools_webrtc/mb/mb_unittest.py | 2 +- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/audio/BUILD.gn b/audio/BUILD.gn index 17dcdcec34..5e51699d6e 100644 --- a/audio/BUILD.gn +++ b/audio/BUILD.gn @@ -284,12 +284,6 @@ if (rtc_include_tests) { if (is_mac) { data += [ "../tools_webrtc/audio_quality/mac/pesq" ] } - - if (is_win) { - write_runtime_deps = "${root_out_dir}/${target_name}.exe.runtime_deps" - } else { - write_runtime_deps = "${root_out_dir}/${target_name}.runtime_deps" - } } } diff --git a/tools_webrtc/mb/gn_isolate_map.pyl b/tools_webrtc/mb/gn_isolate_map.pyl index 9948a457d9..02e84788e9 100644 --- a/tools_webrtc/mb/gn_isolate_map.pyl +++ b/tools_webrtc/mb/gn_isolate_map.pyl @@ -68,7 +68,7 @@ }, "low_bandwidth_audio_perf_test": { "label": "//audio:low_bandwidth_audio_perf_test", - "type": "console_test_launcher", + "type": "script", "script": "//audio/test/low_bandwidth_audio_test.py", "args": [ ".", "--remove", diff --git a/tools_webrtc/mb/mb.py b/tools_webrtc/mb/mb.py index 01f4914f3c..82fac8a00c 100755 --- a/tools_webrtc/mb/mb.py +++ b/tools_webrtc/mb/mb.py @@ -723,12 +723,13 @@ class MetaBuildWrapper: android = 'target_os="android"' in vals['gn_args'] for target in swarming_targets: + label = isolate_map[target]['label'] + stamp_runtime_deps = 'obj/%s.stamp.runtime_deps' % label.replace(':', '/') if android: # Android targets may be either android_apk or executable. The # former will result in runtime_deps associated with the stamp # file, while the latter will result in runtime_deps associated # with the executable. - label = isolate_map[target]['label'] runtime_deps_targets = [ target + '.runtime_deps', 'obj/%s.stamp.runtime_deps' % label.replace(':', '/') @@ -739,12 +740,11 @@ class MetaBuildWrapper: else: runtime_deps_targets = ['browser_tests.runtime_deps'] elif isolate_map[target]['type'] == 'script': - label = isolate_map[target]['label'].split(':')[1] - runtime_deps_targets = ['%s.runtime_deps' % label] + runtime_deps_targets = [stamp_runtime_deps] if self.platform == 'win32': - runtime_deps_targets += [label + '.exe.runtime_deps'] + runtime_deps_targets += [target + '.exe.runtime_deps'] else: - runtime_deps_targets += [label + '.runtime_deps'] + runtime_deps_targets += [target + '.runtime_deps'] elif self.platform == 'win32': runtime_deps_targets = [target + '.exe.runtime_deps'] else: diff --git a/tools_webrtc/mb/mb_unittest.py b/tools_webrtc/mb/mb_unittest.py index a79186a0d0..d8a6452a86 100755 --- a/tools_webrtc/mb/mb_unittest.py +++ b/tools_webrtc/mb/mb_unittest.py @@ -461,7 +461,7 @@ class UnitTest(unittest.TestCase): " 'type': 'script'," " 'script': '//base/base_unittests_script.py'," "}}\n"), - '/fake_src/out/Default/base_unittests.runtime_deps': + '/fake_src/out/Default/base_unittests_script.runtime_deps': ("base_unittests\n" "base_unittests_script.py\n"), }