Extracted a helper library from vie_auto_test.
This CL does not attempt to fix the style issues in the moved tb_ files, at least not yet. In general I've tried to avoid dependencies between the library and vie_auto_test: vie_auto_test depends on the library but not the other way around. I had to make some slight changes to achieve this. I had to remove some ViETest::Log statements in tb_interfaces.cc and I had to move knowledge of where to put output files to the library. I think it ended up being pretty clean in the end but let me know if I missed something. I tried to convert all paths I touched to src-relative paths, so look out if I missed something there. BUG= TEST= Review URL: https://webrtc-codereview.appspot.com/450004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1923 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -68,6 +68,16 @@ std::string ProjectRootPath() {
|
||||
return kCannotFindProjectRootDir;
|
||||
}
|
||||
|
||||
#ifdef WEBRTC_ANDROID
|
||||
|
||||
std::string OutputPath() {
|
||||
// We need to touch this variable so it doesn't get flagged as unused.
|
||||
(void)kOutputDirName;
|
||||
return "/sdcard/";
|
||||
}
|
||||
|
||||
#else // WEBRTC_ANDROID
|
||||
|
||||
std::string OutputPath() {
|
||||
std::string path = ProjectRootPath();
|
||||
if (path == kCannotFindProjectRootDir) {
|
||||
@ -80,6 +90,8 @@ std::string OutputPath() {
|
||||
return path + kPathDelimiter;
|
||||
}
|
||||
|
||||
#endif // !WEBRTC_ANDROID
|
||||
|
||||
std::string WorkingDir() {
|
||||
char path_buffer[FILENAME_MAX];
|
||||
if (!GET_CURRENT_DIR(path_buffer, sizeof(path_buffer))) {
|
||||
|
||||
@ -92,9 +92,10 @@ extern const char* kCannotFindProjectRootDir;
|
||||
std::string ProjectRootPath();
|
||||
|
||||
// Creates and returns the absolute path to the output directory where log files
|
||||
// and other test artifacts should be put. The output directory is always a
|
||||
// and other test artifacts should be put. The output directory is generally a
|
||||
// directory named "out" at the top-level of the project, i.e. a subfolder to
|
||||
// the path returned by ProjectRootPath().
|
||||
// the path returned by ProjectRootPath(). The exception is Android where we use
|
||||
// /sdcard/ instead.
|
||||
//
|
||||
// Details described for ProjectRootPath() apply here too.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user