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

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

Issue 1138993009: Revert of [Android] Refactor the native test wrappers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 343f1180c6803ff600589777472790f348c87fc2..d49ca116488afe5f14faca3fd95a7b2f15e66834 100644
--- a/testing/android/native_test/native_test_launcher.cc
+++ b/testing/android/native_test/native_test_launcher.cc
@@ -28,11 +28,13 @@
#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 {
@@ -121,7 +123,7 @@
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);
@@ -143,6 +145,7 @@
return RegisterNativesImpl(env);
}
+
// TODO(nileshagrawal): now that we're using FIFO, test scripts can detect EOF.
// Remove the signal handlers.
void InstallHandlers() {
@@ -156,6 +159,3 @@
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