(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:
parent
21299d4e00
commit
372701a872
@ -107,6 +107,7 @@ class Pathname;
|
||||
} \
|
||||
} while (0);
|
||||
|
||||
talk_base::Pathname GetGoogle3Directory();
|
||||
talk_base::Pathname GetTalkDirectory();
|
||||
|
||||
#endif // TALK_BASE_GUNIT_H_
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user