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 d49ca116488afe5f14faca3fd95a7b2f15e66834..343f1180c6803ff600589777472790f348c87fc2 100644 |
--- a/testing/android/native_test/native_test_launcher.cc |
+++ b/testing/android/native_test/native_test_launcher.cc |
@@ -28,14 +28,12 @@ |
#include "jni/NativeTestActivity_jni.h" |
#include "testing/android/native_test/native_test_util.h" |
-using testing::native_test_util::ArgsToArgv; |
-using testing::native_test_util::ParseArgsFromCommandLineFile; |
-using testing::native_test_util::ParseArgsFromString; |
-using testing::native_test_util::ScopedMainEntryLogger; |
- |
// The main function of the program to be wrapped as a test apk. |
extern int main(int argc, char** argv); |
+namespace testing { |
+namespace android { |
+ |
namespace { |
// The test runner script writes the command line file in |
@@ -123,7 +121,7 @@ static void RunTests(JNIEnv* env, |
exit(EXIT_FAILURE); |
} |
} |
- if (!base::android::RedirectStream(stdout, stdout_file_path, "w")) { |
+ if (!base::android::RedirectStream(stdout, stdout_file_path, "w+")) { |
AndroidLog(ANDROID_LOG_ERROR, "Failed to redirect stream to file: %s: %s\n", |
stdout_file_path.value().c_str(), strerror(errno)); |
exit(EXIT_FAILURE); |
@@ -145,7 +143,6 @@ bool RegisterNativeTestJNI(JNIEnv* env) { |
return RegisterNativesImpl(env); |
} |
- |
// TODO(nileshagrawal): now that we're using FIFO, test scripts can detect EOF. |
// Remove the signal handlers. |
void InstallHandlers() { |
@@ -159,3 +156,6 @@ void InstallHandlers() { |
sigaction(kExceptionSignals[i], &sa, &g_old_sa[kExceptionSignals[i]]); |
} |
} |
+ |
+} // namespace android |
+} // namespace testing |