diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-18 19:34:34 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-18 19:34:34 +0000 |
commit | cd1990648f5b2c00274f7f49491a2a55c4f64cb8 (patch) | |
tree | 19c75a936deba61fa67dea7856a151ded8e37b9d /testing/android/native_test_util.cc | |
parent | a5152777f762a86da0445fe4e29c255245251aaa (diff) | |
download | chromium_src-cd1990648f5b2c00274f7f49491a2a55c4f64cb8.zip chromium_src-cd1990648f5b2c00274f7f49491a2a55c4f64cb8.tar.gz chromium_src-cd1990648f5b2c00274f7f49491a2a55c4f64cb8.tar.bz2 |
Move CreateFIFO() and RedirectStream() from testing/android/ to base/android/.
They will be used by content_shell to create the necessary fifos when running layout tests.
BUG=232044
TBR=darin,yfriedman
Review URL: https://chromiumcodereview.appspot.com/16599008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207060 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'testing/android/native_test_util.cc')
-rw-r--r-- | testing/android/native_test_util.cc | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/testing/android/native_test_util.cc b/testing/android/native_test_util.cc index 084908b..c0ea7b0 100644 --- a/testing/android/native_test_util.cc +++ b/testing/android/native_test_util.cc @@ -4,14 +4,6 @@ #include "testing/android/native_test_util.h" -#include <android/log.h> -#include <stdarg.h> -#include <stdio.h> -#include <sys/stat.h> -#include <sys/types.h> -#include <unistd.h> - -#include "base/command_line.h" #include "base/file_util.h" #include "base/files/file_path.h" #include "base/strings/string_tokenizer.h" @@ -19,15 +11,6 @@ namespace { -const char kLogTag[] = "chromium"; - -void AndroidLogError(const char* format, ...) { - va_list args; - va_start(args, format); - __android_log_vprint(ANDROID_LOG_ERROR, kLogTag, format, args); - va_end(args); -} - void ParseArgsFromString(const std::string& command_line, std::vector<std::string>* args) { base::StringTokenizer tokenizer(command_line, kWhitespaceASCII); @@ -44,25 +27,6 @@ void ParseArgsFromString(const std::string& command_line, namespace testing { namespace native_test_util { -void CreateFIFO(const char* fifo_path) { - unlink(fifo_path); - // Default permissions for mkfifo is ignored, chmod is required. - if (mkfifo(fifo_path, 0666) || chmod(fifo_path, 0666)) { - AndroidLogError("Failed to create fifo %s: %s\n", - fifo_path, strerror(errno)); - exit(EXIT_FAILURE); - } -} - -void RedirectStream( - FILE* stream, const char* path, const char* mode) { - if (!freopen(path, mode, stream)) { - AndroidLogError("Failed to redirect stream to file: %s: %s\n", - path, strerror(errno)); - exit(EXIT_FAILURE); - } -} - void ParseArgsFromCommandLineFile( const char* path, std::vector<std::string>* args) { base::FilePath command_line(path); |