From 0c15a092937b1409dbc1dab3151ed7847ac8eaf2 Mon Sep 17 00:00:00 2001 From: Edward Lemur Date: Thu, 8 Feb 2018 20:16:41 +0100 Subject: [PATCH] Don't use gtest-parallel when running webrtc_perf_tests. When we run webrtc_perf_tests with gtest-parallel, each test is run individually, and this results in the file with the perf results being overwritten each time. To avoid this, we won't use gtest-parallel when running webrtc_perf_tests, so we will simply run the binary directly. TBR=phoglund@chromium.org Bug: chromium:755660 Change-Id: I24db36e512fcf604a3de2adf4d0b4325b2c3d1ae Reviewed-on: https://webrtc-review.googlesource.com/49340 Reviewed-by: Edward Lemur Reviewed-by: Henrik Lundin Commit-Queue: Edward Lemur Cr-Commit-Position: refs/heads/master@{#21982} --- modules/audio_coding/codecs/isac/fix/test/kenny.cc | 4 ++-- test/test_main.cc | 9 +++++++-- tools_webrtc/gtest-parallel-wrapper.py | 12 ------------ tools_webrtc/mb/gn_isolate_map.pyl | 2 +- 4 files changed, 10 insertions(+), 17 deletions(-) diff --git a/modules/audio_coding/codecs/isac/fix/test/kenny.cc b/modules/audio_coding/codecs/isac/fix/test/kenny.cc index 4e8b8b747e..01edbe7913 100644 --- a/modules/audio_coding/codecs/isac/fix/test/kenny.cc +++ b/modules/audio_coding/codecs/isac/fix/test/kenny.cc @@ -230,7 +230,7 @@ TEST(IsacFixTest, Kenny) { printf("[-RTP_INIT num] :if -RTP_INIT option is specified num will be" " the initial\n"); printf(" value of the rtp sequence number.\n\n"); - printf("[--chartjson_result_file file]\n"); + printf("[--isolated-script-test-perf-output file]\n"); printf(" :If this option is specified, perf values will be" " written to this file in a JSON format.\n\n"); printf("Example usage :\n\n"); @@ -390,7 +390,7 @@ TEST(IsacFixTest, Kenny) { i++; } - if (!strcmp ("--chartjson_result_file", argv[i])) { + if (!strcmp ("--isolated-script-test-perf-output", argv[i])) { strncpy(chartjson_result_file, argv[i+1], 50); i++; } diff --git a/test/test_main.cc b/test/test_main.cc index 962c677d9b..cb99564973 100644 --- a/test/test_main.cc +++ b/test/test_main.cc @@ -36,7 +36,12 @@ DEFINE_bool( #else DEFINE_string( - chartjson_result_file, + isolated_script_test_output, + "", + "Intentionally ignored flag intended for Chromium."); + +DEFINE_string( + isolated_script_test_perf_output, "", "Path where the perf results should be stored in the JSON format described " "by " @@ -90,7 +95,7 @@ int main(int argc, char* argv[]) { int exit_code = RUN_ALL_TESTS(); - std::string chartjson_result_file = FLAG_chartjson_result_file; + std::string chartjson_result_file = FLAG_isolated_script_test_perf_output; if (!chartjson_result_file.empty()) { webrtc::test::WritePerfResults(chartjson_result_file); } diff --git a/tools_webrtc/gtest-parallel-wrapper.py b/tools_webrtc/gtest-parallel-wrapper.py index b527a5e815..f7cf07aeac 100755 --- a/tools_webrtc/gtest-parallel-wrapper.py +++ b/tools_webrtc/gtest-parallel-wrapper.py @@ -107,11 +107,6 @@ def _ParseArgs(): parser.add_argument('--store-test-artifacts', action='store_true', default=False) - # Used to store results of perf tests. See - # https://chromium.googlesource.com/external/github.com/catapult-project/catapult/+/HEAD/dashboard/docs/data-format.md - parser.add_argument('--isolated-script-test-perf-output', type=str, - default=None) - # No-sandbox is a Chromium-specific flag, ignore it. # TODO(oprypin): Remove (bugs.webrtc.org/8115) parser.add_argument('--no-sandbox', action='store_true', default=False) @@ -145,13 +140,6 @@ def _ParseArgs(): test_artifacts_dir, ] - # The corresponding flag in WebRTC is called 'chartjson_result_file'. - if options.isolated_script_test_perf_output: - executable_args += [ - '--chartjson_result_file', - options.isolated_script_test_perf_output, - ] - # GTEST_SHARD_INDEX and GTEST_TOTAL_SHARDS must be removed from the # environment. Otherwise it will be picked up by the binary, causing a bug # where only tests in the first shard are executed. diff --git a/tools_webrtc/mb/gn_isolate_map.pyl b/tools_webrtc/mb/gn_isolate_map.pyl index 6e6130bc76..3dbb4a860e 100644 --- a/tools_webrtc/mb/gn_isolate_map.pyl +++ b/tools_webrtc/mb/gn_isolate_map.pyl @@ -135,6 +135,6 @@ "webrtc_perf_tests": { "label": "//:webrtc_perf_tests", "timeout": 3600, # 1 hour - "type": "non_parallel_console_test_launcher", + "type": "raw", }, }