aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/ok_test.cpp
Commit message (Collapse)AuthorAge
* rm okGravatar Mike Klein2018-02-15
| | | | | | | | | | I'm not really using it much anymore. Time to dedup and fold its ideas into DM. Change-Id: I40a238c9083460e1b7aee459757f867dfd3d79af Reviewed-on: https://skia-review.googlesource.com/107800 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Use GrContextFactories that produce a single GrContext in unit tests.Gravatar Brian Salomon2017-11-15
| | | | | | | | | | | | | | | | | | | | | This is to alleviate problems due to the command buffer getting bent out of shape when the current OpenGL context is switched out from under it (because we ran a test with a native GL context). This, however is not a full solution. More changes will be required to ensure that after running each command buffer or native test we bind the null context. This does allow us to take a step in that direction without breaking anything too badly. Moreover, there is no real benefit to reusing a GrContextFactory. Modifies DEF_GPUTEST to take GrContextOptions rather than a factory to use. Tests were already using their own factories anyway. In tests that use GrContextFactory the factory instance is moved to the inner loop. Modifies gpucts and skia_test to not use persistent GrContextFactories. Change-Id: Ie7a36793545c775f2f30653ead6fec93a3d22717 Reviewed-on: https://skia-review.googlesource.com/71861 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* sprinkle more tracing in GM, tests, and ok, and add TRACE_FUNCGravatar Mike Klein2017-07-24
| | | | | | | Change-Id: I562d438bd65e9fd900cfc6831f971b4af25c8ae6 Reviewed-on: https://skia-review.googlesource.com/26361 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* ok, most features can be viasGravatar Mike Klein2017-03-31
| | | | | | | | | | | | | This refactors most features out of ok's core into vias: -w --> a .png dumping via, "png", opening the door to other types -m/-s --> a filtering via "filter" Everything now can print a brief help message too. Change-Id: I9e653aab98fd57182a6d458c7a80052130980284 Reviewed-on: https://skia-review.googlesource.com/10509 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* ok, unify failure and crash loggingGravatar Mike Klein2017-03-28
| | | | | | | | | | Just as deferred and locked crash logging makes crashes easier to read, so does deferred and locked failure logging make failures easier to read. Change-Id: I71578d61b0056f8d7e692149762def1f155c0387 Reviewed-on: https://skia-review.googlesource.com/10280 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* ok, plumb in GrContextFactoryGravatar Mike Klein2017-03-28
| | | | | | | | | | | | | Didn't know what options would be useful here (path renderers?), so I've left them default. Obviously we can thread them through TestSrc options. I now have "841 ok" and no failures on my Linux laptop, though I imagine the GPU tests are all just no-op'd by the TODO at the bottom of the file. Change-Id: Id934c0bdb5de96d96f2a391106b5d20116f41979 Reviewed-on: https://skia-review.googlesource.com/10213 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* ok, make tests really workGravatar Mike Klein2017-03-28
| | | | | | | | | | | | | | | | | | | | Here's how things work now: ~/skia (tests)> ninja -C out ok; and out/ok test ninja: Entering directory `out' [2/2] link ok 112 ok../tests/TestConfigParsing.cpp:336 configs[i]->getBackend().equals(expectedConfigs[i].backend) 211 ok, 1 failed../tests/ShadowUtilsTest.cpp:25 Expected shadow tessellation to fail but it did not. ../tests/ShadowUtilsTest.cpp:30 Expected shadow tessellation to fail but it did not. ../tests/ShadowUtilsTest.cpp:36 Expected shadow tessellation to fail but it did not. ../tests/ShadowUtilsTest.cpp:42 Expected shadow tessellation to fail but it did not. 637 ok, 2 failed Change-Id: I84b108d4fabb538a2674831dd1ca64b149d7d265 Reviewed-on: https://skia-review.googlesource.com/10209 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* ok: add basic unit test supportGravatar Mike Klein2017-03-27
Plenty TODO remaining. This can actually kind of run without a test reporter or GrContext: $ out/ok test 784 ok, 56 crashed ... lots of stack traces ... Most tests don't use the reporter unless they're going to fail. Change-Id: I7333e2c63ade5e671ebf60022d19390f1fc1c93a Reviewed-on: https://skia-review.googlesource.com/10201 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>