Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Unified Diff: webrtc/test/testsupport/iosfileutils.mm

Issue 1694353003: iOS: Add resource files for tests and implement OutputPath (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix ifdef for Android build Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/test/testsupport/fileutils.cc ('k') | webrtc/webrtc_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/test/testsupport/iosfileutils.mm
diff --git a/webrtc/test/testsupport/iosfileutils.mm b/webrtc/test/testsupport/iosfileutils.mm
index f3615ed6814b41a696fd04da166a96a59237c2a9..87b7397c7911d981c42a62a90f214f935d8a6838 100644
--- a/webrtc/test/testsupport/iosfileutils.mm
+++ b/webrtc/test/testsupport/iosfileutils.mm
@@ -54,6 +54,18 @@ std::string IOSResourcePath(std::string name, std::string extension) {
}
}
+// For iOS, we don't have access to the output directory. Return the path to the
+// temporary directory instead. This is mostly used by tests that need to write
+// output files to disk.
+std::string IOSOutputPath() {
+ @autoreleasepool {
+ NSString* tempDir = NSTemporaryDirectory();
+ if (tempDir == nil)
+ tempDir = @"/tmp";
+ return StdStringFromNSString(tempDir);
+ }
+}
+
} // namespace test
} // namespace webrtc
« no previous file with comments | « webrtc/test/testsupport/fileutils.cc ('k') | webrtc/webrtc_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698