From d15f3e1220549d30cd2ab6063208ff022b67d3fd Mon Sep 17 00:00:00 2001 From: Jeremy Leconte Date: Fri, 18 Feb 2022 10:16:32 +0100 Subject: [PATCH] Prepare the code to run ios tests with the standalone recipe. The flags isolated-script-test-output and isolated-script-test-perf-output need to be consumed by the tests. The generated .app folder in added in the data list of the gni file. This will make it available in the runtime_deps file and thus will be populated to the swarming tasks. Bug: webrtc:13556 Change-Id: I2c75774b847d9f686c3abc00ba0400bbc3fcefae Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/240520 Reviewed-by: Artem Titov Reviewed-by: Christoffer Jansson Reviewed-by: Mirko Bonadei Commit-Queue: Jeremy Leconte Cr-Commit-Position: refs/heads/main@{#36029} --- test/test_main_lib.cc | 4 +--- tools_webrtc/mb/mb.py | 7 +++++++ webrtc.gni | 9 +++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/test/test_main_lib.cc b/test/test_main_lib.cc index 6e5cff175a..ea3b714ffd 100644 --- a/test/test_main_lib.cc +++ b/test/test_main_lib.cc @@ -57,7 +57,7 @@ ABSL_FLAG( "described by histogram.proto in " "https://chromium.googlesource.com/catapult/."); -#else +#endif ABSL_FLAG(std::string, isolated_script_test_output, @@ -72,8 +72,6 @@ ABSL_FLAG( "described by histogram.proto in " "https://chromium.googlesource.com/catapult/."); -#endif - constexpr char kPlotAllMetrics[] = "all"; ABSL_FLAG(std::vector, plot, diff --git a/tools_webrtc/mb/mb.py b/tools_webrtc/mb/mb.py index d1869135b1..bbb5b6f472 100755 --- a/tools_webrtc/mb/mb.py +++ b/tools_webrtc/mb/mb.py @@ -900,6 +900,7 @@ class MetaBuildWrapper: is_android = 'target_os="android"' in vals['gn_args'] is_linux = self.platform.startswith('linux') and not is_android + is_ios = 'target_os="ios"' in vals['gn_args'] if test_type == 'nontest': self.WriteFailureAndRaise('We should not be isolating %s.' % target, @@ -932,6 +933,12 @@ class MetaBuildWrapper: '--logcat-output-file', '${ISOLATED_OUTDIR}/logcats', '--store-tombstones' ] + elif is_ios: + cmdline += [ + vpython_exe, '../../tools_webrtc/flags_compatibility.py', + 'bin/run_%s' % target, '--out-dir', '${ISOLATED_OUTDIR}' + ] + extra_files.append('../../tools_webrtc/flags_compatibility.py') else: if test_type == 'raw': cmdline += [vpython_exe, '../../tools_webrtc/flags_compatibility.py'] diff --git a/webrtc.gni b/webrtc.gni index 6e81fc4285..8040f628d9 100644 --- a/webrtc.gni +++ b/webrtc.gni @@ -530,6 +530,15 @@ template("rtc_test") { [ "//third_party/llvm-build/Release+Asserts/lib/libstdc++.so.6" ] } } + # TODO(crbug.com/webrtc/13556): Adding the .app folder in the runtime_deps + # shoulnd't be necessary. this code should be removed and the same solution + # as Chromium should be used. + if (is_ios) { + if (!defined(invoker.data)) { + data = [] + } + data += [ "${root_out_dir}/${target_name}.app" ] + } } }