Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(326)

Unified Diff: testing/android/native_test/native_test_launcher.cc

Issue 2514943002: [Android] Clean up gtest stdout handling. (Closed)
Patch Set: write/update -> append/update Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « testing/android/native_test/java/src/org/chromium/native_test/NativeTestInstrumentationTestRunner.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/android/native_test/native_test_launcher.cc
diff --git a/testing/android/native_test/native_test_launcher.cc b/testing/android/native_test/native_test_launcher.cc
index a9475d1ae1bdcb87dffc6516491b62734ee6c15b..2389c731a681c50c71f145803bbdf7d30c9d7f9f 100644
--- a/testing/android/native_test/native_test_launcher.cc
+++ b/testing/android/native_test/native_test_launcher.cc
@@ -72,7 +72,6 @@ static void RunTests(JNIEnv* env,
const JavaParamRef<jstring>& jcommand_line_flags,
const JavaParamRef<jstring>& jcommand_line_file_path,
const JavaParamRef<jstring>& jstdout_file_path,
- jboolean jstdout_fifo,
const JavaParamRef<jobject>& app_context,
const JavaParamRef<jstring>& jtest_data_dir) {
// Command line initialized basically, will be fully initialized later.
@@ -106,15 +105,7 @@ static void RunTests(JNIEnv* env,
// A few options, such "--gtest_list_tests", will just use printf directly
// Always redirect stdout to a known file.
- unlink(stdout_file_path.value().c_str());
- if (jstdout_fifo) {
- if (!base::android::CreateFIFO(stdout_file_path, 0666)) {
- AndroidLog(ANDROID_LOG_ERROR, "Failed to create fifo %s: %s\n",
- stdout_file_path.value().c_str(), strerror(errno));
- exit(EXIT_FAILURE);
- }
- }
- if (!base::android::RedirectStream(stdout, stdout_file_path, "w+")) {
+ if (!base::android::RedirectStream(stdout, stdout_file_path, "a+")) {
AndroidLog(ANDROID_LOG_ERROR, "Failed to redirect stream to file: %s: %s\n",
stdout_file_path.value().c_str(), strerror(errno));
exit(EXIT_FAILURE);
« no previous file with comments | « testing/android/native_test/java/src/org/chromium/native_test/NativeTestInstrumentationTestRunner.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698