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 <ehmaldonado@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21982}
This commit is contained in:
Edward Lemur
2018-02-08 20:16:41 +01:00
committed by Commit Bot
parent 88a38e32e7
commit 0c15a09293
4 changed files with 10 additions and 17 deletions

View File

@ -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++;
}

View File

@ -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);
}

View File

@ -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.

View File

@ -135,6 +135,6 @@
"webrtc_perf_tests": {
"label": "//:webrtc_perf_tests",
"timeout": 3600, # 1 hour
"type": "non_parallel_console_test_launcher",
"type": "raw",
},
}