Skip to content

Commit

Permalink
test: replace the SVG validity test with a pytest-based one
Browse files Browse the repository at this point in the history
This python test splits out the various checks into individual tests and
python's assertions allow for messages. This should make debugging SVG
failures a lot easier.

One extra check over the C version of the test: we now check that we
only have one element for any given ID.
  • Loading branch information
whot committed May 8, 2024
1 parent 2c2ff0e commit a93291b
Show file tree
Hide file tree
Showing 3 changed files with 199 additions and 497 deletions.
11 changes: 0 additions & 11 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ endif
############# tests ############################

if get_option('tests').enabled()
dep_libxml = dependency('libxml-2.0', required : false)
dep_dl = cc.find_library('dl')

tests_cflags = ['-DTOPSRCDIR="@0@"'.format(meson.current_source_dir())]
Expand Down Expand Up @@ -272,16 +271,6 @@ if get_option('tests').enabled()
install: false)
test('test-stylus-validity', test_stylus_validity, suite: ['all', 'valgrind'])

if dep_libxml.found()
test_svg_validity = executable('test-svg-validity',
'test/test-tablet-svg-validity.c',
dependencies: [dep_libwacom, dep_libxml, dep_glib],
include_directories: [includes_src],
c_args: tests_cflags,
install: false)
test('test-svg-validity', test_svg_validity, suite: ['all', 'valgrind'])
endif

valgrind = find_program('valgrind', required : false)
if valgrind.found()
valgrind_suppressions_file = dir_test / 'valgrind.suppressions'
Expand Down
Loading

0 comments on commit a93291b

Please sign in to comment.