diff options
author | tfarina <tfarina@chromium.org> | 2014-06-18 14:32:48 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-06-18 14:32:49 -0700 |
commit | bcbc1788b478b1e54079318ad073e8490aa66fae (patch) | |
tree | 5492557ad07a5917364b69721788bc5ec471954a /tests/skia_test.cpp | |
parent | 6518eaaefac27a823c55c16c12b3c698f09aabf5 (diff) | |
download | skia-bcbc1788b478b1e54079318ad073e8490aa66fae.tar.gz |
Refactor how we handle resources path in Tests.
This idea emerged while doing https://codereview.chromium.org/321723002/
(commit 880914c35c8f7fc2e9c57134134c883baf66e538).
BUG=None
TEST=make tests && out/Debug/tests
R=mtklein@google.com
Author: tfarina@chromium.org
Review URL: https://codereview.chromium.org/346453002
Diffstat (limited to 'tests/skia_test.cpp')
-rw-r--r-- | tests/skia_test.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/skia_test.cpp b/tests/skia_test.cpp index f70a7fab6..f4b67c9bc 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()); } |