mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
As we add more rendering backends, adding a new enum value to a single macro `INSTANTIATE_PLAYGROUND_SUITE` in `playground.h` will create a new test variant in any suite that uses playgrounds. The invocations will look like the following: ``` [ RUN ] Play/TypographerTest.CanCreateGlyphAtlas/Metal [ OK ] Play/TypographerTest.CanCreateGlyphAtlas/Metal (210 ms) [ RUN ] Play/TypographerTest.CanCreateGlyphAtlas/OpenGLES [ OK ] Play/TypographerTest.CanCreateGlyphAtlas/OpenGLES (xxx ms) ``` If you want to test just one backend, you may add a filter like so `--gtest_filter="*/Metal"` Right now, I have not added a the OpenGLES variant to the default test suite instantiation since there are so many failures (that is just a stub ATM). But, if the need arises to skip specific tests based on the backend in use (we won't support instancing in OpenGLES for example), the backend for the playground may be queried before deciding to GTEST_SKIP the invocation. One additional change in the patch that will be reworked soon is the Metal specificity of the source set generated after reflection. This will be made agnostic in the coming few patches. Right now, these headers are in the `mtl` folder.