Gyp: Sanity Part II (GM+Tests)

DOCS_PREVIEW= https://skia.org/dev/testing/tests?cl=1133343006

Review URL: https://codereview.chromium.org/1133343006
This commit is contained in:
halcanary 2015-05-17 06:47:49 -07:00 committed by Commit bot
parent fec0211be4
commit 2e0303f91b
3 changed files with 26 additions and 437 deletions

View File

@ -17,230 +17,7 @@
# It'd be nice to do this in SampleApp.gypi, but I can't find a way to make it work.
[ 'not ("<(_target_name)" == "SampleApp" and skia_is_bot)', {
'sources': [
'../gm/aaclip.cpp',
'../gm/aarectmodes.cpp',
'../gm/addarc.cpp',
'../gm/all_bitmap_configs.cpp',
'../gm/alphagradients.cpp',
'../gm/anisotropic.cpp',
'../gm/arcofzorro.cpp',
'../gm/arithmode.cpp',
'../gm/astcbitmap.cpp',
'../gm/badpaint.cpp',
'../gm/beziereffects.cpp',
'../gm/beziers.cpp',
'../gm/bigblurs.cpp',
'../gm/bigmatrix.cpp',
'../gm/bigtext.cpp',
'../gm/bitmapcopy.cpp',
'../gm/bitmapfilters.cpp',
'../gm/bitmappremul.cpp',
'../gm/bitmaprect.cpp',
'../gm/bitmaprecttest.cpp',
'../gm/bitmapscroll.cpp',
'../gm/bitmapshader.cpp',
'../gm/bitmapsource.cpp',
'../gm/bitmapsource2.cpp',
'../gm/bleed.cpp',
'../gm/blend.cpp',
'../gm/blurcircles.cpp',
'../gm/blurs.cpp',
'../gm/blurquickreject.cpp',
'../gm/blurrect.cpp',
'../gm/blurroundrect.cpp',
'../gm/bmpfilterqualityrepeat.cpp',
'../gm/circles.cpp',
'../gm/circularclips.cpp',
'../gm/clipdrawdraw.cpp',
'../gm/clip_strokerect.cpp',
'../gm/clippedbitmapshaders.cpp',
'../gm/cgms.cpp',
'../gm/cgm.c',
'../gm/colorcube.cpp',
'../gm/coloremoji.cpp',
'../gm/colorfilterimagefilter.cpp',
'../gm/colorfilters.cpp',
'../gm/colormatrix.cpp',
'../gm/colortype.cpp',
'../gm/colortypexfermode.cpp',
'../gm/colorwheel.cpp',
'../gm/concavepaths.cpp',
'../gm/complexclip.cpp',
'../gm/complexclip2.cpp',
'../gm/complexclip3.cpp',
'../gm/composeshader.cpp',
'../gm/conicpaths.cpp',
'../gm/constcolorprocessor.cpp',
'../gm/convex_all_line_paths.cpp',
'../gm/convexpaths.cpp',
'../gm/convexpolyclip.cpp',
'../gm/convexpolyeffect.cpp',
'../gm/copyTo4444.cpp',
'../gm/cubicpaths.cpp',
'../gm/cmykjpeg.cpp',
'../gm/dstreadshuffle.cpp',
'../gm/degeneratesegments.cpp',
'../gm/dcshader.cpp',
'../gm/discard.cpp',
'../gm/dashcubics.cpp',
'../gm/dashing.cpp',
'../gm/distantclip.cpp',
'../gm/dftext.cpp',
'../gm/displacement.cpp',
'../gm/downsamplebitmap.cpp',
'../gm/drawbitmaprect.cpp',
'../gm/drawfilter.cpp',
'../gm/drawlooper.cpp',
'../gm/dropshadowimagefilter.cpp',
'../gm/drrect.cpp',
'../gm/dstreadshuffle.cpp',
'../gm/etc1bitmap.cpp',
'../gm/extractbitmap.cpp',
'../gm/emboss.cpp',
'../gm/emptypath.cpp',
'../gm/fadefilter.cpp',
'../gm/fatpathfill.cpp',
'../gm/factory.cpp',
'../gm/filltypes.cpp',
'../gm/filltypespersp.cpp',
'../gm/filterbitmap.cpp',
'../gm/filterfastbounds.cpp',
'../gm/filterindiabox.cpp',
'../gm/fontcache.cpp',
'../gm/fontmgr.cpp',
'../gm/fontscaler.cpp',
'../gm/gammatext.cpp',
'../gm/getpostextpath.cpp',
'../gm/giantbitmap.cpp',
'../gm/glyph_pos.cpp',
'../gm/glyph_pos_align.cpp',
'../gm/gradients.cpp',
'../gm/gradients_2pt_conical.cpp',
'../gm/gradients_no_texture.cpp',
'../gm/gradientDirtyLaundry.cpp',
'../gm/gradient_matrix.cpp',
'../gm/gradtext.cpp',
'../gm/grayscalejpg.cpp',
'../gm/hairlines.cpp',
'../gm/hairmodes.cpp',
'../gm/hittestpath.cpp',
'../gm/imagealphathreshold.cpp',
'../gm/imageblur.cpp',
'../gm/imageblur2.cpp',
'../gm/imageblurtiled.cpp',
'../gm/imagemagnifier.cpp',
'../gm/imageresizetiled.cpp',
'../gm/inversepaths.cpp',
'../gm/lerpmode.cpp',
'../gm/lighting.cpp',
'../gm/lumafilter.cpp',
'../gm/image.cpp',
'../gm/imagefilters.cpp',
'../gm/imagefiltersbase.cpp',
'../gm/imagefiltersclipped.cpp',
'../gm/imagefilterscropped.cpp',
'../gm/imagefilterscropexpand.cpp',
'../gm/imagefiltersgraph.cpp',
'../gm/imagefiltersscaled.cpp',
'../gm/imagefilterstransformed.cpp',
'../gm/internal_links.cpp',
'../gm/largeglyphblur.cpp',
'../gm/lcdtext.cpp',
'../gm/linepaths.cpp',
'../gm/matrixconvolution.cpp',
'../gm/matriximagefilter.cpp',
'../gm/megalooper.cpp',
'../gm/mixedxfermodes.cpp',
'../gm/mixedtextblobs.cpp',
'../gm/mipmap.cpp',
'../gm/modecolorfilters.cpp',
'../gm/morphology.cpp',
'../gm/multipicturedraw.cpp',
'../gm/nested.cpp',
'../gm/ninepatchstretch.cpp',
'../gm/nonclosedpaths.cpp',
'../gm/offsetimagefilter.cpp',
'../gm/ovals.cpp',
'../gm/patch.cpp',
'../gm/patchgrid.cpp',
'../gm/patheffects.cpp',
'../gm/pathfill.cpp',
'../gm/pathinterior.cpp',
'../gm/pathopsinverse.cpp',
'../gm/pathopsskpclip.cpp',
'../gm/pathreverse.cpp',
'../gm/peekpixels.cpp',
'../gm/perlinnoise.cpp',
'../gm/picture.cpp',
'../gm/pictureimagefilter.cpp',
'../gm/pictureshader.cpp',
'../gm/pictureshadertile.cpp',
'../gm/pixelsnap.cpp',
'../gm/points.cpp',
'../gm/poly2poly.cpp',
'../gm/polygons.cpp',
'../gm/quadpaths.cpp',
'../gm/recordopts.cpp',
'../gm/rects.cpp',
'../gm/repeated_bitmap.cpp',
'../gm/resizeimagefilter.cpp',
'../gm/rrect.cpp',
'../gm/rrects.cpp',
'../gm/roundrects.cpp',
'../gm/samplerstress.cpp',
# '../gm/scalebitmap.cpp',
'../gm/shaderbounds.cpp',
'../gm/selftest.cpp',
'../gm/shadertext.cpp',
'../gm/shadertext2.cpp',
'../gm/shadertext3.cpp',
'../gm/shadows.cpp',
'../gm/shallowgradient.cpp',
'../gm/simpleaaclip.cpp',
'../gm/skbug1719.cpp',
'../gm/smallarc.cpp',
'../gm/smallimage.cpp',
'../gm/spritebitmap.cpp',
'../gm/srcmode.cpp',
'../gm/stlouisarch.cpp',
'../gm/stringart.cpp',
'../gm/strokefill.cpp',
'../gm/strokerect.cpp',
'../gm/strokerects.cpp',
'../gm/strokes.cpp',
'../gm/stroketext.cpp',
'../gm/surface.cpp',
'../gm/tablecolorfilter.cpp',
'../gm/texteffects.cpp',
'../gm/testimagefilters.cpp',
'../gm/texdata.cpp',
'../gm/variedtext.cpp',
'../gm/tallstretchedbitmaps.cpp',
'../gm/textblob.cpp',
'../gm/textbloblooper.cpp',
'../gm/textblobcolortrans.cpp',
'../gm/textblobgeometrychange.cpp',
'../gm/textblobshader.cpp',
'../gm/textblobtransforms.cpp',
'../gm/texturedomaineffect.cpp',
'../gm/thinrects.cpp',
'../gm/thinstrokedrects.cpp',
'../gm/tiledscaledbitmap.cpp',
'../gm/tileimagefilter.cpp',
'../gm/tilemodes.cpp',
'../gm/tilemodes_scaled.cpp',
'../gm/tinybitmap.cpp',
'../gm/transparency.cpp',
'../gm/typeface.cpp',
'../gm/vertices.cpp',
'../gm/verttext.cpp',
'../gm/verttext2.cpp',
'../gm/verylargebitmap.cpp',
'../gm/xfermodeimagefilter.cpp',
'../gm/xfermodes.cpp',
'../gm/xfermodes2.cpp',
'../gm/xfermodes3.cpp',
'../gm/yuvtorgbeffect.cpp',
'<!@(python find.py ../gm "*.c*")',
# Files needed by particular GMs
'../src/gpu/GrTestBatch.h',
@ -251,6 +28,10 @@
'../src/utils/debugger/SkObjectParser.h',
'../src/utils/debugger/SkObjectParser.cpp',
],
'sources!': [
'../gm/system_preferences_default.cpp',
'../gm/techtalk1.cpp',
],
}],
# TODO: Several GMs are known to cause particular problems on Android, so
# we disable them on Android. See http://skbug.com/2326

View File

@ -31,14 +31,13 @@
'tools.gyp:sk_tool_utils',
],
'conditions': [
[ 'skia_os == "android"', {
'include_dirs': [
'../src/ports',
],
'sources': [
'../tests/FontConfigParser.cpp',
],
}],
[ 'skia_os == "android"',
{
'include_dirs': [ '../src/ports', ],
}, {
'sources!': [ '../tests/FontConfigParser.cpp', ],
}
],
[ 'skia_android_framework == 1', {
'libraries': [
'-ldl',
@ -46,208 +45,25 @@
}],
],
'sources': [
'../tests/Test.cpp',
'../tests/Test.h',
'../tests/AAClipTest.cpp',
'../tests/ARGBImageEncoderTest.cpp',
'../tests/AnnotationTest.cpp',
'../tests/AsADashTest.cpp',
'../tests/AtomicTest.cpp',
'../tests/BadIcoTest.cpp',
'../tests/BitSetTest.cpp',
'../tests/BitmapCopyTest.cpp',
'../tests/BitmapGetColorTest.cpp',
'../tests/BitmapHasherTest.cpp',
'../tests/BitmapHeapTest.cpp',
'../tests/BitmapTest.cpp',
'../tests/BlendTest.cpp',
'../tests/BlitRowTest.cpp',
'../tests/BlurTest.cpp',
'../tests/CTest.cpp',
'../tests/CachedDataTest.cpp',
'../tests/CachedDecodingPixelRefTest.cpp',
'../tests/CanvasStateHelpers.cpp',
'../tests/CanvasStateTest.cpp',
'../tests/CanvasTest.cpp',
'../tests/ChecksumTest.cpp',
'../tests/ClampRangeTest.cpp',
'../tests/ClipCacheTest.cpp',
'../tests/ClipCubicTest.cpp',
'../tests/ClipStackTest.cpp',
'../tests/ClipperTest.cpp',
'../tests/CodexTest.cpp',
'../tests/ColorFilterTest.cpp',
'../tests/ColorPrivTest.cpp',
'../tests/ColorTest.cpp',
'../tests/CPlusPlusEleven.cpp',
'../tests/DashPathEffectTest.cpp',
'../tests/DataRefTest.cpp',
'../tests/DeferredCanvasTest.cpp',
'../tests/DeflateWStream.cpp',
'../tests/DequeTest.cpp',
'../tests/DeviceLooperTest.cpp',
'../tests/DiscardableMemoryPoolTest.cpp',
'../tests/DiscardableMemoryTest.cpp',
'../tests/DocumentTest.cpp',
'../tests/DrawBitmapRectTest.cpp',
'../tests/DrawFilterTest.cpp',
'../tests/DrawPathTest.cpp',
'../tests/DrawTextTest.cpp',
'../tests/DynamicHashTest.cpp',
'../tests/EmptyPathTest.cpp',
'../tests/ErrorTest.cpp',
'../tests/FillPathTest.cpp',
'../tests/FitsInTest.cpp',
'../tests/FlateTest.cpp',
'../tests/FloatingPointTextureTest.cpp',
'../tests/FontHostStreamTest.cpp',
'../tests/FontHostTest.cpp',
'../tests/FontMgrTest.cpp',
'../tests/FontNamesTest.cpp',
'../tests/FontObjTest.cpp',
'../tests/FrontBufferedStreamTest.cpp',
'../tests/FunctionTest.cpp',
'../tests/GLInterfaceValidationTest.cpp',
'../tests/GLProgramsTest.cpp',
'../tests/GeometryTest.cpp',
'../tests/GifTest.cpp',
'../tests/GpuColorFilterTest.cpp',
'../tests/GpuDrawPathTest.cpp',
'../tests/GpuLayerCacheTest.cpp',
'../tests/GpuRectanizerTest.cpp',
'../tests/GrContextFactoryTest.cpp',
'../tests/GrDrawTargetTest.cpp',
'../tests/GrAllocatorTest.cpp',
'../tests/GrMemoryPoolTest.cpp',
'../tests/GrOrderedSetTest.cpp',
'../tests/GrGLSLPrettyPrintTest.cpp',
'../tests/GrRedBlackTreeTest.cpp',
'../tests/GrSurfaceTest.cpp',
'../tests/GrTBSearchTest.cpp',
'../tests/GrTRecorderTest.cpp',
'../tests/GradientTest.cpp',
'../tests/HashTest.cpp',
'../tests/ImageCacheTest.cpp',
'../tests/ImageDecodingTest.cpp',
'../tests/ImageFilterTest.cpp',
'../tests/ImageGeneratorTest.cpp',
'../tests/ImageIsOpaqueTest.cpp',
'../tests/ImageNewShaderTest.cpp',
'../tests/IndexedPngOverflowTest.cpp',
'../tests/InfRectTest.cpp',
'../tests/InterpolatorTest.cpp',
'../tests/InvalidIndexedPngTest.cpp',
'../tests/JpegTest.cpp',
'../tests/KtxTest.cpp',
'../tests/LListTest.cpp',
'../tests/LayerDrawLooperTest.cpp',
'../tests/LayerRasterizerTest.cpp',
'../tests/LazyPtrTest.cpp',
'../tests/MD5Test.cpp',
'../tests/MallocPixelRefTest.cpp',
'../tests/MaskCacheTest.cpp',
'../tests/MathTest.cpp',
'../tests/Matrix44Test.cpp',
'../tests/MatrixClipCollapseTest.cpp',
'../tests/MatrixTest.cpp',
'../tests/MemoryTest.cpp',
'../tests/MemsetTest.cpp',
'../tests/MessageBusTest.cpp',
'../tests/MetaDataTest.cpp',
'../tests/MipMapTest.cpp',
'../tests/NameAllocatorTest.cpp',
'../tests/OSPathTest.cpp',
'../tests/OnceTest.cpp',
'../tests/PDFInvalidBitmapTest.cpp',
'../tests/PDFJpegEmbedTest.cpp',
'../tests/PDFPrimitivesTest.cpp',
'../tests/PMFloatTest.cpp',
'../tests/PackBitsTest.cpp',
'../tests/PaintTest.cpp',
'../tests/ParsePathTest.cpp',
'../tests/PathCoverageTest.cpp',
'../tests/PathMeasureTest.cpp',
'../tests/PathTest.cpp',
'../tests/PictureBBHTest.cpp',
'../tests/PictureShaderTest.cpp',
'../tests/PictureTest.cpp',
'../tests/PixelRefTest.cpp',
'../tests/PointTest.cpp',
'../tests/PremulAlphaRoundTripTest.cpp',
'../tests/QuickRejectTest.cpp',
'../tests/RTConfRegistryTest.cpp',
'../tests/RTreeTest.cpp',
'../tests/RandomTest.cpp',
'../tests/ReadPixelsTest.cpp',
'../tests/ReadWriteAlphaTest.cpp',
'../tests/Reader32Test.cpp',
'../tests/RecordDrawTest.cpp',
'../tests/RecordReplaceDrawTest.cpp',
'../tests/RecordOptsTest.cpp',
'../tests/RecordPatternTest.cpp',
'../tests/RecordTest.cpp',
'../tests/RecorderTest.cpp',
'../tests/RecordingXfermodeTest.cpp',
'../tests/RectTest.cpp',
'../tests/RefCntTest.cpp',
'../tests/RefDictTest.cpp',
'../tests/RegionTest.cpp',
'../tests/ResourceCacheTest.cpp',
'../tests/RoundRectTest.cpp',
'../tests/RuntimeConfigTest.cpp',
'../tests/SHA1Test.cpp',
'../tests/ScalarTest.cpp',
'../tests/SerializationTest.cpp',
'../tests/ShaderImageFilterTest.cpp',
'../tests/ShaderOpacityTest.cpp',
'../tests/SizeTest.cpp',
'../tests/SkNxTest.cpp',
'../tests/SkBase64Test.cpp',
'../tests/SkImageTest.cpp',
'../tests/SkResourceCacheTest.cpp',
'../tests/SmallAllocatorTest.cpp',
'../tests/SortTest.cpp',
'../tests/SrcOverTest.cpp',
'../tests/StreamTest.cpp',
'../tests/StringTest.cpp',
'../tests/StrokeTest.cpp',
'../tests/StrokerTest.cpp',
'../tests/SurfaceTest.cpp',
'../tests/SVGDeviceTest.cpp',
'../tests/SwizzlerTest.cpp',
'../tests/TessellatingPathRendererTests.cpp',
'../tests/TArrayTest.cpp',
'../tests/TemplatesTest.cpp',
'../tests/TDPQueueTest.cpp',
'../tests/Time.cpp',
'../tests/TLSTest.cpp',
'../tests/TextBlobTest.cpp',
'../tests/TextureCompressionTest.cpp',
'../tests/ToUnicodeTest.cpp',
'../tests/TracingTest.cpp',
'../tests/TypefaceTest.cpp',
'../tests/UnicodeTest.cpp',
'../tests/UtilsTest.cpp',
'../tests/VarAllocTest.cpp',
'../tests/WArrayTest.cpp',
'../tests/WritePixelsTest.cpp',
'../tests/Writer32Test.cpp',
'../tests/XfermodeTest.cpp',
'../tests/YUVCacheTest.cpp',
'../tests/MatrixClipCollapseTest.cpp',
'<!@(python find.py ../tests "*.c*")',
'../src/utils/debugger/SkDrawCommand.h',
'../src/utils/debugger/SkDrawCommand.cpp',
'../src/utils/debugger/SkDebugCanvas.h',
'../src/utils/debugger/SkDebugCanvas.cpp',
'../src/utils/debugger/SkObjectParser.h',
'../src/utils/debugger/SkObjectParser.cpp',
'../tests/PipeTest.cpp',
'../src/pipe/utils/SamplePipeControllers.cpp',
'../tests/TDStackNesterTest.cpp',
'../experimental/PdfViewer/src/SkTDStackNester.h',
],
'sources!': [
'../tests/SkpSkGrTest.cpp',
'../tests/skia_test.cpp',
'../tests/PathOpsAngleIdeas.cpp',
'../tests/PathOpsBattles.cpp',
'../tests/PathOpsCubicLineIntersectionIdeas.cpp',
'../tests/PathOpsDebug.cpp',
'../tests/PathOpsOpLoopThreadedTest.cpp',
'../tests/PathOpsSkpClipTest.cpp',
],
}

View File

@ -23,11 +23,7 @@ Writing a Unit Test
REPORTER_ASSERT(reporter, lifeIsGood);
}
2. Add a line to `gyp/tests.gypi`:
'../tests/NewUnitTest.cpp',
3. Recompile and run test:
2. Recompile and run test:
./gyp_skia
ninja -C out/Debug dm
@ -54,17 +50,13 @@ Writing a Rendering Test
canvas->drawLine(16, 16, 112, 112, p);
}
2. Add a line to `gyp/gmslides.gypi`:
'../gm/newgmtest.cpp',
3. Recompile and run test:
2. Recompile and run test:
./gyp_skia
ninja -C out/Debug dm
out/Debug/dm --match newgmtest
4. Run the GM inside SampleApp:
3. Run the GM inside SampleApp:
./gyp_skia
ninja -C out/Debug SampleApp