diff --git a/test/test_main.cc b/test/test_main.cc index 46a7de6b22..8091b3fb74 100644 --- a/test/test_main.cc +++ b/test/test_main.cc @@ -8,6 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include + #include "rtc_base/flags.h" #include "rtc_base/logging.h" #include "rtc_base/thread.h" @@ -38,9 +40,10 @@ DEFINE_bool( #else -DEFINE_string(isolated_script_test_output, - "", - "Intentionally ignored flag intended for Chromium."); +DEFINE_string( + isolated_script_test_output, + "", + "Path to output an empty JSON file which Chromium infra requires."); DEFINE_string( isolated_script_test_perf_output, @@ -112,6 +115,13 @@ int main(int argc, char* argv[]) { webrtc::test::WritePerfResults(chartjson_result_file); } + std::string result_filename = FLAG_isolated_script_test_output; + if (!result_filename.empty()) { + std::ofstream result_file(result_filename); + result_file << "{\"version\": 3}"; + result_file.close(); + } + return exit_code; #endif