aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/TestTest.cpp
Commit message (Collapse)AuthorAge
* Remove SK_SUPPORT_GPU checks in tool-only codeGravatar Brian Osman2018-05-31
| | | | | | | | | | | | | | | | Most of this is (obviously) not necessary to do, but once I started, I figured I'd just get it all. Tools (nanobench, DM, skiaserve), all GMs, benches, and unit tests, plus support code (command line parsing and config stuff). This is almost entirely mechanical. Bug: skia: Change-Id: I209500f8df8c5bd43f8298ff26440d1c4d7425fb Reviewed-on: https://skia-review.googlesource.com/131153 Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* 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>
* Enable many more tests for VulkanGravatar egdaniel2016-06-28
| | | | | | | BUG=skia:5461 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2103133002 Review-Url: https://codereview.chromium.org/2103133002
* Turn ContextInfos returned by GrContextFactory into structs.Gravatar bsalomon2016-05-11
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1966013002 Review-Url: https://codereview.chromium.org/1966013002
* Make more unit tests run on VulkanGravatar bsalomon2016-04-12
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1885623002 Review URL: https://codereview.chromium.org/1885623002
* Make existing unit tests only run on GL contextsGravatar bsalomon2016-04-06
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1869503002 Review URL: https://codereview.chromium.org/1869503002
* One signature for creating unit tests that run on premade GrContextsGravatar bsalomon2016-04-05
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1860593002 Review URL: https://codereview.chromium.org/1860593002
* Remove 'native' context unit test macro.Gravatar bsalomon2016-04-05
| | | | | | | | | The only test ran long is GLPrograms. I halved its iteration count to preserve the runtime on devices that support GL and GLES. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1855993002 Review URL: https://codereview.chromium.org/1855993002
* rename sk_gpu_test::GLContext to sk_gpu_test::GLTestContextGravatar bsalomon2016-03-31
| | | | | | | | | | | | | rename subclasses Fix up the EGL native GLTestContext GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1849463002 TBR=jvanverth@google.com Committed: https://skia.googlesource.com/skia/+/4c7f0a16312c374eba4e8d5d46435ce9eb0b9971 Review URL: https://codereview.chromium.org/1849463002
* Revert of rename sk_gpu_test::GLContext to sk_gpu_test::GLTestContext ↵Gravatar bsalomon2016-03-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #5 id:80001 of https://codereview.chromium.org/1849463002/ ) Reason for revert: breaking bots Original issue's description: > rename sk_gpu_test::GLContext to sk_gpu_test::GLTestContext > > rename subclasses > > Fix up the EGL native GLTestContext > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1849463002 > > TBR=jvanverth@google.com > > Committed: https://skia.googlesource.com/skia/+/4c7f0a16312c374eba4e8d5d46435ce9eb0b9971 TBR=jvanverth@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1850543003
* rename sk_gpu_test::GLContext to sk_gpu_test::GLTestContextGravatar bsalomon2016-03-31
| | | | | | | | | | | rename subclasses Fix up the EGL native GLTestContext GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1849463002 TBR=jvanverth@google.com Review URL: https://codereview.chromium.org/1849463002
* Move SkGLContext and some GrGLInterface implementations to skgputest moduleGravatar bsalomon2016-03-30
| | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1815823002 CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot Committed: https://skia.googlesource.com/skia/+/fe3456cb006110d045b26ff3f8681b893a757b58 Review URL: https://codereview.chromium.org/1815823002
* Revert of Move SkGLContext and some GrGLInterface implementations to ↵Gravatar robertphillips2016-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | skgputest module (patchset #13 id:240001 of https://codereview.chromium.org/1815823002/ ) Reason for revert: red bots Original issue's description: > Move SkGLContext and some GrGLInterface implementations to skgputest module > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1815823002 > CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot > > Committed: https://skia.googlesource.com/skia/+/fe3456cb006110d045b26ff3f8681b893a757b58 TBR=jvanverth@google.com,bsalomon@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1845473004
* Move SkGLContext and some GrGLInterface implementations to skgputest moduleGravatar bsalomon2016-03-30
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1815823002 CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot Review URL: https://codereview.chromium.org/1815823002
* Style bikeshed - remove extraneous whitespaceGravatar halcanary2016-03-29
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002 Review URL: https://codereview.chromium.org/1842753002
* Generate list of GPU contexts outside SurfaceTest testsGravatar kkinnunen2015-11-20
Add support for feeding the tests with contexts directly to the unit test framework. This fixes the problem where tests are more complex than needed just in order to run the test code with multiple backends. Also makes it possible to change the logic how contexts are created. Instead of direct numbering, the different testable contexts may be generated from filtered cross-product of context options. For example: currently NVPR is a type of context. However, it could be also an on/off feature of any context. In order to test this kind of context, the enumeration can not be just of context type. It's simpler to move the enumeration out of the tests. A test targeting both normal and GPU backends would look like: static void test_obj_behavior(skiatest::Reporter* reporter, SkObj* obj, [other params] ) { ... test with obj and param .. } DEF_TEST(ObjBehavior, reporter) { for (auto& object : generate_object) { for (auto& other_param : generate_other_variant) { test_obj_behavior(reporter, object, other_param); } } } #if SK_SUPPORT_GPU DEF_GPUTEST_FOR_ALL_CONTEXTS(ObjBehavior_Gpu, reporter, context) { for (auto& object : generate_gpu_object) { for (auto& other_param : generate_other_variant) { test_obj_behavior(reporter, object, other_param); } } } #endif Uses the feature in SurfaceTests as an example. Moves SkSurface -related tests from ImageTest to SurfaceTest. BUG=skia:2992 Review URL: https://codereview.chromium.org/1446453003