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

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: fix rebase conflict 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
« no previous file with comments | « 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 f70a7fab62fc22d5141aebfcf6a34a9013b8ff03..f4b67c9bc40f4df6d3821096e5ee587b89b2e997 100644
--- a/tests/skia_test.cpp
+++ b/tests/skia_test.cpp
@@ -7,6 +7,7 @@
#include "CrashHandler.h"
#include "OverwriteLine.h"
+#include "Resources.h"
#include "SkCommandLineFlags.h"
#include "SkGraphics.h"
#include "SkOSFile.h"
@@ -40,7 +41,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;
@@ -136,7 +136,6 @@ int tool_main(int argc, char** argv) {
SetupCrashHandler();
SkCommandLineFlags::SetUsage("");
SkCommandLineFlags::Parse(argc, argv);
- Test::SetResourcePath(FLAGS_resourcePath[0]);
#if SK_ENABLE_INST_COUNT
if (FLAGS_leaks) {
@@ -158,7 +157,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());
}
« no previous file with comments | « tests/Test.cpp ('k') | tools/Resources.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698