(Auto)update libjingle 67023528-> 67036361

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6160 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
buildbot@webrtc.org 2014-05-14 20:27:59 +00:00
parent 21299d4e00
commit 372701a872
2 changed files with 19 additions and 16 deletions

View File

@ -107,6 +107,7 @@ class Pathname;
} \
} while (0);
talk_base::Pathname GetGoogle3Directory();
talk_base::Pathname GetTalkDirectory();
#endif // TALK_BASE_GUNIT_H_

View File

@ -47,28 +47,30 @@ int TestCrtReportHandler(int report_type, char* msg, int* retval) {
}
#endif // WIN32
talk_base::Pathname GetTalkDirectory() {
// Locate talk directory.
// Look in parent dir for parallel directory.
talk_base::Pathname GetSiblingDirectory(
const std::string& parallel_dir) {
talk_base::Pathname path = talk_base::Filesystem::GetCurrentDirectory();
std::string talk_folder_name("talk");
talk_folder_name += path.folder_delimiter();
while (path.folder_name() != talk_folder_name && !path.empty()) {
while (!path.empty()) {
talk_base::Pathname potential_parallel_dir = path;
potential_parallel_dir.AppendFolder(parallel_dir);
if (talk_base::Filesystem::IsFolder(potential_parallel_dir)) {
return potential_parallel_dir;
}
path.SetFolder(path.parent_folder());
}
// If not running inside "talk" folder, then assume running in its parent
// folder.
if (path.empty()) {
path = talk_base::Filesystem::GetCurrentDirectory();
path.AppendFolder("talk");
// Make sure the folder exist.
if (!talk_base::Filesystem::IsFolder(path)) {
path.clear();
}
}
return path;
}
talk_base::Pathname GetGoogle3Directory() {
return GetSiblingDirectory("google3");
}
talk_base::Pathname GetTalkDirectory() {
return GetSiblingDirectory("talk");
}
int main(int argc, char** argv) {
testing::InitGoogleTest(&argc, argv);
FlagList::SetFlagsFromCommandLine(&argc, argv, false);