| 1 |
test_renderer = executable('test-svg-renderer', |
| 2 |
sources: ['test-svg-renderer.c'], |
| 3 |
c_args: common_cflags, |
| 4 |
link_with: testutils_lib, |
| 5 |
dependencies: libgtk_dep, |
| 6 |
) |
| 7 |
|
| 8 |
test_data = [ |
| 9 |
'attach-to-pattern.svg', |
| 10 |
'bad-filter.svg', |
| 11 |
'bad-gradient.svg', |
| 12 |
'blend-mode.svg', |
| 13 |
'circle.svg', |
| 14 |
'circular.svg', |
| 15 |
'clip.svg', |
| 16 |
'clip2.svg', |
| 17 |
'clip3.svg', |
| 18 |
'clip4.svg', |
| 19 |
'clip5.svg', |
| 20 |
'clip6.svg', |
| 21 |
'clip7.svg', |
| 22 |
'color.svg', |
| 23 |
'conditional.svg', |
| 24 |
'dashes.svg', |
| 25 |
'ellipse.svg', |
| 26 |
'ellipse2.svg', |
| 27 |
'filter.svg', |
| 28 |
'filter-blend.svg', |
| 29 |
'filter-color-matrix.svg', |
| 30 |
'filter-combined.svg', |
| 31 |
'filter-component-transfer.svg', |
| 32 |
'filter-composite.svg', |
| 33 |
'filter-dropshadow.svg', |
| 34 |
'filter-empty.svg', |
| 35 |
'filter-fill-paint.svg', |
| 36 |
'filter-flood.svg', |
| 37 |
'filter-gaussian-blur.svg', |
| 38 |
'filter-image.svg', |
| 39 |
'filter-image-shenanigans.svg', |
| 40 |
'filter-merge.svg', |
| 41 |
'filter-offset.svg', |
| 42 |
'filter-offset2.svg', |
| 43 |
'filter-primitive-units-object-bounding-box.svg', |
| 44 |
'filter-primitive-units-user-space-on-use.svg', |
| 45 |
'filter-tile.svg', |
| 46 |
'filter-units-combined.svg', |
| 47 |
'filter-units-object-bounding-box.svg', |
| 48 |
'filter-units-user-space-on-use.svg', |
| 49 |
'fonts.svg', |
| 50 |
'font-size-units.svg', |
| 51 |
'gpa-attachment1.svg', |
| 52 |
'gpa-attachment2.svg', |
| 53 |
'gpa-attachment3.svg', |
| 54 |
'gradient-templates1.svg', |
| 55 |
'gradient-templates2.svg', |
| 56 |
'gradient-transform.svg', |
| 57 |
'image.svg', |
| 58 |
'initial-state1.svg', |
| 59 |
'initial-state2.svg', |
| 60 |
'initial-state3.svg', |
| 61 |
'initial-state4.svg', |
| 62 |
'isolation.svg', |
| 63 |
'line.svg', |
| 64 |
'linear-gradient1.svg', |
| 65 |
'linear-gradient2.svg', |
| 66 |
'linear-gradient3.svg', |
| 67 |
'linear-gradient4.svg', |
| 68 |
'linear-gradient5.svg', |
| 69 |
'linear-gradient6.svg', |
| 70 |
'linear-gradient7.svg', |
| 71 |
'linear-gradient8.svg', |
| 72 |
'linear-gradient9.svg', |
| 73 |
'linear-gradient10.svg', |
| 74 |
'linear-gradient11.svg', |
| 75 |
'marker1.svg', |
| 76 |
'marker2.svg', |
| 77 |
'marker3.svg', |
| 78 |
'marker4.svg', |
| 79 |
'marker5.svg', |
| 80 |
'marker6.svg', |
| 81 |
'marker7.svg', |
| 82 |
'marker-cycles.svg', |
| 83 |
'mask.svg', |
| 84 |
'more-filters.svg', |
| 85 |
'nested-svg.svg', |
| 86 |
'nested-svg-aspect-ratio.svg', |
| 87 |
'nested-svg-overflow.svg', |
| 88 |
'nested-svg-positioning.svg', |
| 89 |
'nested-svg-viewbox.svg', |
| 90 |
'nested-use.test', |
| 91 |
'non-scaling-stroke.svg', |
| 92 |
'not-rendered.svg', |
| 93 |
'opacity.svg', |
| 94 |
'overflow.svg', |
| 95 |
'paint-order.svg', |
| 96 |
'paint-server-fallback.svg', |
| 97 |
'pattern1.svg', |
| 98 |
'pattern2.svg', |
| 99 |
'pattern3.svg', |
| 100 |
'pattern4.svg', |
| 101 |
'pattern5.svg', |
| 102 |
'pattern6.svg', |
| 103 |
'pattern7.svg', |
| 104 |
'pattern8.svg', |
| 105 |
'pattern-billion-laughs.test', |
| 106 |
'pattern-fallback-cycles.svg', |
| 107 |
'percentage.svg', |
| 108 |
'polygon.svg', |
| 109 |
'polyline.svg', |
| 110 |
'pservers-grad-08-b.svg', |
| 111 |
'pservers-grad-11-b.svg', |
| 112 |
'radial-gradient1.svg', |
| 113 |
'radial-gradient2.svg', |
| 114 |
'radial-gradient3.svg', |
| 115 |
'radial-gradient4.svg', |
| 116 |
'rect.svg', |
| 117 |
'rect2.svg', |
| 118 |
'render-after-use.svg', |
| 119 |
'rounded-rect.svg', |
| 120 |
'rotated-pattern.svg', |
| 121 |
'rotated-pattern2.svg', |
| 122 |
'serialize-bad-font.svg', |
| 123 |
'size-units.svg', |
| 124 |
'spec-ellipse.svg', |
| 125 |
'spec-opacity.svg', |
| 126 |
'spec-rect.svg', |
| 127 |
'style.svg', |
| 128 |
'symbol.svg', |
| 129 |
'text-align-01-b.svg', |
| 130 |
'text-fonts-02-t.svg', |
| 131 |
'text-stroke-gradient.svg', |
| 132 |
'text-text-03-b.svg', |
| 133 |
'text-text-10-t.svg', |
| 134 |
'transform-rotate.svg', |
| 135 |
'use.svg', |
| 136 |
'use2.svg', |
| 137 |
'viewbox.svg', |
| 138 |
'viewports.svg', |
| 139 |
'zero-length-path-stroke.svg', |
| 140 |
] |
| 141 |
|
| 142 |
slow_tests = [ |
| 143 |
'nested-use.test', |
| 144 |
'pattern-billion-laughs.test', |
| 145 |
] |
| 146 |
|
| 147 |
# attachments rely on the animations for the initial placement |
| 148 |
test_requires_animation = [ |
| 149 |
'attach-to-pattern.svg', |
| 150 |
'gpa-attachment1.svg', |
| 151 |
'gpa-attachment2.svg', |
| 152 |
'gpa-attachment3.svg', |
| 153 |
] |
| 154 |
|
| 155 |
foreach testname : test_data |
| 156 |
suites = [ 'svg', 'svg renderer' ] |
| 157 |
if testname in slow_tests |
| 158 |
suites += 'slow' |
| 159 |
endif |
| 160 |
test('svg renderer ' + testname, test_renderer, |
| 161 |
args: [ '--tap', |
| 162 |
'--verbose', |
| 163 |
'-k', |
| 164 |
'--output', meson.current_build_dir(), |
| 165 |
join_paths(meson.current_source_dir(), testname), |
| 166 |
], |
| 167 |
protocol: 'tap', |
| 168 |
env: [ |
| 169 |
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()), |
| 170 |
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()) |
| 171 |
], |
| 172 |
suite: suites |
| 173 |
) |
| 174 |
if not (testname in test_requires_animation) |
| 175 |
test('svg renderer (no animation) ' + testname, test_renderer, |
| 176 |
args: [ '--tap', |
| 177 |
'--verbose', |
| 178 |
'--no-animations', |
| 179 |
'-k', |
| 180 |
'--output', meson.current_build_dir(), |
| 181 |
join_paths(meson.current_source_dir(), testname), |
| 182 |
], |
| 183 |
protocol: 'tap', |
| 184 |
env: [ |
| 185 |
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()), |
| 186 |
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()) |
| 187 |
], |
| 188 |
suite: suites |
| 189 |
) |
| 190 |
endif |
| 191 |
endforeach |