iOS: Add resource files for tests and implement OutputPath
With this change the following tests have been successfully
passing in the iOS Simulator for iPhone 5 and iOS 9:
* audio_decoder_unittests
* common_video_unittests
* modules_tests
* rtc_api_objc_tests
* rtc_pc_unittests
* system_wrappers_unittests
* voice_engine_unittests
The modules_unittests and common_audio_unittests are
handled in https://codereview.webrtc.org/1698033002/
BUG=webrtc:4755
NOTRY=True
Review URL: https://codereview.webrtc.org/1694353003
Cr-Commit-Position: refs/heads/master@{#11646}
diff --git a/webrtc/test/testsupport/fileutils.cc b/webrtc/test/testsupport/fileutils.cc
index 4ff0034..2fab425 100644
--- a/webrtc/test/testsupport/fileutils.cc
+++ b/webrtc/test/testsupport/fileutils.cc
@@ -43,6 +43,7 @@
#if defined(WEBRTC_IOS)
// Defined in iosfileutils.mm. No header file to discourage use elsewhere.
+std::string IOSOutputPath();
std::string IOSResourcePath(std::string name, std::string extension);
#endif
@@ -59,9 +60,12 @@
#else
// The file we're looking for to identify the project root dir.
const char* kProjectRootFileName = "DEPS";
+#if !defined(WEBRTC_IOS)
const char* kOutputDirName = "out";
-const char* kFallbackPath = "./";
#endif
+const char* kFallbackPath = "./";
+#endif // !defined(WEBRTC_ANDROID)
+
#if !defined(WEBRTC_IOS)
const char* kResourcesDirName = "resources";
#endif
@@ -140,6 +144,9 @@
}
std::string OutputPath() {
+#if defined(WEBRTC_IOS)
+ return IOSOutputPath();
+#else
std::string path = ProjectRootPath();
if (path == kCannotFindProjectRootDir) {
return kFallbackPath;
@@ -149,6 +156,7 @@
return kFallbackPath;
}
return path + kPathDelimiter;
+#endif
}
std::string WorkingDir() {