(Auto)update libjingle 67043374-> 67044055

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6163 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
buildbot@webrtc.org 2014-05-14 21:35:19 +00:00
parent 3e924683d4
commit ef5a752c29
4 changed files with 27 additions and 34 deletions

View File

@ -36,11 +36,6 @@
#include "testing/base/public/gunit.h" #include "testing/base/public/gunit.h"
#endif #endif
// forward declarations
namespace talk_base {
class Pathname;
}
// Wait until "ex" is true, or "timeout" expires. // Wait until "ex" is true, or "timeout" expires.
#define WAIT(ex, timeout) \ #define WAIT(ex, timeout) \
for (uint32 start = talk_base::Time(); \ for (uint32 start = talk_base::Time(); \
@ -107,7 +102,4 @@ class Pathname;
} \ } \
} while (0); } while (0);
talk_base::Pathname GetGoogle3Directory();
talk_base::Pathname GetTalkDirectory();
#endif // TALK_BASE_GUNIT_H_ #endif // TALK_BASE_GUNIT_H_

View File

@ -45,6 +45,7 @@
#include "talk/base/common.h" #include "talk/base/common.h"
#include "talk/base/gunit.h" #include "talk/base/gunit.h"
#include "talk/base/nethelpers.h" #include "talk/base/nethelpers.h"
#include "talk/base/pathutils.h"
#include "talk/base/stream.h" #include "talk/base/stream.h"
#include "talk/base/stringencode.h" #include "talk/base/stringencode.h"
#include "talk/base/stringutils.h" #include "talk/base/stringutils.h"
@ -451,6 +452,30 @@ inline bool ReadFile(const char* filename, std::string* contents) {
return success; return success;
} }
// Look in parent dir for parallel directory.
inline talk_base::Pathname GetSiblingDirectory(
const std::string& parallel_dir) {
talk_base::Pathname path = talk_base::Filesystem::GetCurrentDirectory();
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());
}
return path;
}
inline talk_base::Pathname GetGoogle3Directory() {
return GetSiblingDirectory("google3");
}
inline talk_base::Pathname GetTalkDirectory() {
return GetSiblingDirectory("talk");
}
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Unittest predicates which are similar to STREQ, but for raw memory // Unittest predicates which are similar to STREQ, but for raw memory
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -12,7 +12,6 @@
#include "talk/base/fileutils.h" #include "talk/base/fileutils.h"
#include "talk/base/gunit.h" #include "talk/base/gunit.h"
#include "talk/base/logging.h" #include "talk/base/logging.h"
#include "talk/base/pathutils.h"
DEFINE_bool(help, false, "prints this message"); DEFINE_bool(help, false, "prints this message");
DEFINE_string(log, "", "logging options to use"); DEFINE_string(log, "", "logging options to use");
@ -47,30 +46,6 @@ int TestCrtReportHandler(int report_type, char* msg, int* retval) {
} }
#endif // WIN32 #endif // WIN32
// Look in parent dir for parallel directory.
talk_base::Pathname GetSiblingDirectory(
const std::string& parallel_dir) {
talk_base::Pathname path = talk_base::Filesystem::GetCurrentDirectory();
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());
}
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);

View File

@ -35,6 +35,7 @@
#include "talk/base/pathutils.h" #include "talk/base/pathutils.h"
#include "talk/base/stream.h" #include "talk/base/stream.h"
#include "talk/base/stringutils.h" #include "talk/base/stringutils.h"
#include "talk/base/testutils.h"
#include "talk/media/base/rtpdump.h" #include "talk/media/base/rtpdump.h"
#include "talk/media/base/videocapturer.h" #include "talk/media/base/videocapturer.h"
#include "talk/media/base/videoframe.h" #include "talk/media/base/videoframe.h"
@ -254,7 +255,7 @@ void VideoCapturerListener::OnFrameCaptured(VideoCapturer* capturer,
// Returns the absolute path to a file in the testdata/ directory. // Returns the absolute path to a file in the testdata/ directory.
std::string GetTestFilePath(const std::string& filename) { std::string GetTestFilePath(const std::string& filename) {
// Locate test data directory. // Locate test data directory.
talk_base::Pathname path = GetTalkDirectory(); talk_base::Pathname path = testing::GetTalkDirectory();
EXPECT_FALSE(path.empty()); // must be run from inside "talk" EXPECT_FALSE(path.empty()); // must be run from inside "talk"
path.AppendFolder("media"); path.AppendFolder("media");
path.AppendFolder("testdata"); path.AppendFolder("testdata");