diff options
author | 2014-02-25 20:02:09 +0000 | |
---|---|---|
committer | 2014-02-25 20:02:09 +0000 | |
commit | 79e13260cf94427e6ccbfff8242bf85ed4c8187b (patch) | |
tree | decbb335453684fcbe0c9dff854c2b1968226d8a /dm/DMTestTask.cpp | |
parent | 6bd250a2a340348434b7b16bd4e4b5da0f598e3e (diff) |
Revert of Let DM run unit tests. (https://codereview.chromium.org/178273002/)
Reason for revert:
broke tests
Original issue's description:
> Let DM run unit tests.
> - refactor GYPs and a few flags
> - make GPU tests grab a thread-local GrContextFactory when needed as we do in DM for GMs
> - add a few more UI features to make DM more like tests
>
> I believe this makes the program 'tests' obsolete.
>
> It should be somewhat faster to run the two sets together than running the old binaries serially:
> - serial: tests 20s (3m18s CPU), dm 21s (3m01s CPU)
> - together: 27s (6m21s CPU)
>
> Next up is to incorporate benches. I'm only planning there on a single-pass sanity check, so that won't obsolete the program 'bench' just yet.
>
> Tested: out/Debug/tests && out/Debug/dm && echo ok
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=13586
R=bsalomon@google.com, mtklein@google.com, tfarina@chromium.org, mtklein@chromium.org
TBR=bsalomon@google.com, mtklein@chromium.org, mtklein@google.com, tfarina@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: reed@google.com
Review URL: https://codereview.chromium.org/179403010
git-svn-id: http://skia.googlecode.com/svn/trunk@13587 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'dm/DMTestTask.cpp')
-rw-r--r-- | dm/DMTestTask.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/dm/DMTestTask.cpp b/dm/DMTestTask.cpp deleted file mode 100644 index 7a5f8cf9f9..0000000000 --- a/dm/DMTestTask.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "DMTestTask.h" -#include "DMUtil.h" -#include "SkCommandLineFlags.h" - -DEFINE_bool2(pathOpsExtended, x, false, "Run extended pathOps tests."); -DEFINE_bool2(pathOpsSingleThread, z, false, "Disallow pathOps tests from using threads."); -DEFINE_bool2(pathOpsVerbose, V, false, "Tell pathOps tests to be verbose."); - -namespace DM { - -TestTask::TestTask(Reporter* reporter, - TaskRunner* taskRunner, - skiatest::TestRegistry::Factory factory) - : Task(reporter, taskRunner) - , fTaskRunner(taskRunner) - , fTest(factory(NULL)) - , fName(UnderJoin("test", fTest->getName())) {} - -void TestTask::draw() { - if (this->usesGpu()) { - fTest->setGrContextFactory(fTaskRunner->getGrContextFactory()); - } - fTest->setReporter(&fTestReporter); - fTest->run(); - if (!fTest->passed()) { - this->fail(fTestReporter.failure()); - } -} - -bool TestTask::TestReporter::allowExtendedTest() const { return FLAGS_pathOpsExtended; } -bool TestTask::TestReporter::allowThreaded() const { return !FLAGS_pathOpsSingleThread; } -bool TestTask::TestReporter::verbose() const { return FLAGS_pathOpsVerbose; } - -} // namespace DM |