(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:
@ -107,6 +107,7 @@ class Pathname;
|
|||||||
} \
|
} \
|
||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
|
talk_base::Pathname GetGoogle3Directory();
|
||||||
talk_base::Pathname GetTalkDirectory();
|
talk_base::Pathname GetTalkDirectory();
|
||||||
|
|
||||||
#endif // TALK_BASE_GUNIT_H_
|
#endif // TALK_BASE_GUNIT_H_
|
||||||
|
@ -47,28 +47,30 @@ int TestCrtReportHandler(int report_type, char* msg, int* retval) {
|
|||||||
}
|
}
|
||||||
#endif // WIN32
|
#endif // WIN32
|
||||||
|
|
||||||
talk_base::Pathname GetTalkDirectory() {
|
// Look in parent dir for parallel directory.
|
||||||
// Locate talk directory.
|
talk_base::Pathname GetSiblingDirectory(
|
||||||
|
const std::string& parallel_dir) {
|
||||||
talk_base::Pathname path = talk_base::Filesystem::GetCurrentDirectory();
|
talk_base::Pathname path = talk_base::Filesystem::GetCurrentDirectory();
|
||||||
std::string talk_folder_name("talk");
|
while (!path.empty()) {
|
||||||
talk_folder_name += path.folder_delimiter();
|
talk_base::Pathname potential_parallel_dir = path;
|
||||||
while (path.folder_name() != talk_folder_name && !path.empty()) {
|
potential_parallel_dir.AppendFolder(parallel_dir);
|
||||||
|
if (talk_base::Filesystem::IsFolder(potential_parallel_dir)) {
|
||||||
|
return potential_parallel_dir;
|
||||||
|
}
|
||||||
|
|
||||||
path.SetFolder(path.parent_folder());
|
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;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
talk_base::Pathname GetGoogle3Directory() {
|
||||||
|
return GetSiblingDirectory("google3");
|
||||||
|
}
|
||||||
|
|
||||||
|
talk_base::Pathname GetTalkDirectory() {
|
||||||
|
return GetSiblingDirectory("talk");
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
testing::InitGoogleTest(&argc, argv);
|
testing::InitGoogleTest(&argc, argv);
|
||||||
FlagList::SetFlagsFromCommandLine(&argc, argv, false);
|
FlagList::SetFlagsFromCommandLine(&argc, argv, false);
|
||||||
|
Reference in New Issue
Block a user