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

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

Issue 1143903002: [Android] Refactor the native test wrappers. (RELAND) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 months 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/native_test_launcher.h ('k') | testing/android/native_test/native_test_util.h » ('j') | 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 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
« no previous file with comments | « testing/android/native_test/native_test_launcher.h ('k') | testing/android/native_test/native_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698