Make webrtc_perf_tests output an empty result output.json
to satisfy a stricter check introduced in
503174a3e1
The file is supposed to contain actual gtest results, so having an
empty one is a workaround, but this just returns things to the way
they were.
TBR: phoglund@webrtc.org
No-Try: True
Bug: webrtc:9767, chromium:885194
Change-Id: I693cc2df9dfcafd7b728deb9efd445d8fe2c4edf
Reviewed-on: https://webrtc-review.googlesource.com/101301
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Yves Gerey <yvesg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24783}
This commit is contained in:
@ -8,6 +8,8 @@
|
|||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
#include "rtc_base/flags.h"
|
#include "rtc_base/flags.h"
|
||||||
#include "rtc_base/logging.h"
|
#include "rtc_base/logging.h"
|
||||||
#include "rtc_base/thread.h"
|
#include "rtc_base/thread.h"
|
||||||
@ -38,9 +40,10 @@ DEFINE_bool(
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
DEFINE_string(isolated_script_test_output,
|
DEFINE_string(
|
||||||
"",
|
isolated_script_test_output,
|
||||||
"Intentionally ignored flag intended for Chromium.");
|
"",
|
||||||
|
"Path to output an empty JSON file which Chromium infra requires.");
|
||||||
|
|
||||||
DEFINE_string(
|
DEFINE_string(
|
||||||
isolated_script_test_perf_output,
|
isolated_script_test_perf_output,
|
||||||
@ -112,6 +115,13 @@ int main(int argc, char* argv[]) {
|
|||||||
webrtc::test::WritePerfResults(chartjson_result_file);
|
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;
|
return exit_code;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user