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

Unified Diff: tests/skia_test.cpp

Issue 346453002: Refactor how we handle resources path in Tests. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: REBASE Created 6 years, 6 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
« gm/cmykjpeg.cpp ('K') | « tests/Test.cpp ('k') | tools/Resources.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/skia_test.cpp
diff --git a/tests/skia_test.cpp b/tests/skia_test.cpp
index b7fbfc627be5b549a90b363acfbecfa0bc03c002..3dbd05f4a35a15ba49702bec71333119ea448afe 100644
--- a/tests/skia_test.cpp
+++ b/tests/skia_test.cpp
@@ -6,6 +6,7 @@
*/
#include "OverwriteLine.h"
+#include "Resources.h"
#include "SkCommandLineFlags.h"
#include "SkGraphics.h"
#include "SkOSFile.h"
@@ -39,7 +40,6 @@ DEFINE_bool(cpu, true, "whether or not to run CPU tests.");
DEFINE_bool(gpu, true, "whether or not to run GPU tests.");
DEFINE_int32(threads, SkThreadPool::kThreadPerCore,
"Run threadsafe tests on a threadpool with this many threads.");
-DEFINE_string2(resourcePath, i, "resources", "directory for test resources.");
// need to explicitly declare this, or we get some weird infinite loop llist
template TestRegistry* TestRegistry::gHead;
@@ -134,7 +134,6 @@ int tool_main(int argc, char** argv);
int tool_main(int argc, char** argv) {
SkCommandLineFlags::SetUsage("");
SkCommandLineFlags::Parse(argc, argv);
- Test::SetResourcePath(FLAGS_resourcePath[0]);
#if SK_ENABLE_INST_COUNT
if (FLAGS_leaks) {
@@ -156,7 +155,7 @@ int tool_main(int argc, char** argv) {
if (!tmpDir.isEmpty()) {
header.appendf(" --tmpDir %s", tmpDir.c_str());
}
- SkString resourcePath = Test::GetResourcePath();
+ SkString resourcePath = GetResourcePath();
if (!resourcePath.isEmpty()) {
header.appendf(" --resourcePath %s", resourcePath.c_str());
}
« gm/cmykjpeg.cpp ('K') | « tests/Test.cpp ('k') | tools/Resources.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698