| 1 |
api_test_sources = files( |
| 2 |
'api.c', |
| 3 |
'test-utils.c', |
| 4 |
'test-utils.h', |
| 5 |
) |
| 6 |
|
| 7 |
test_c_args = [ |
| 8 |
'-DTEST_DATA_DIR=@0@'.format(meson.current_source_dir()), |
| 9 |
'-DTEST_SRC_DIR=@0@'.format(meson.current_build_dir()), |
| 10 |
'-DTOP_SRC_DIR=@0@'.format(meson.project_source_root()), |
| 11 |
] |
| 12 |
|
| 13 |
if pixbuf_dep.found() |
| 14 |
test_c_args += ['-DHAVE_PIXBUF'] |
| 15 |
endif |
| 16 |
|
| 17 |
api_test = executable( |
| 18 |
'api', |
| 19 |
api_test_sources, |
| 20 |
c_args: test_c_args, |
| 21 |
dependencies: librsvg_dep, |
| 22 |
gnu_symbol_visibility: 'hidden', |
| 23 |
install: false, |
| 24 |
) |
| 25 |
|
| 26 |
test( |
| 27 |
'C API tests', |
| 28 |
api_test, |
| 29 |
|
| 30 |
# the following incantation is for glib's gtestutils |
| 31 |
timeout: -1, |
| 32 |
args: [ '--tap', 'k' ], |
| 33 |
env: [ |
| 34 |
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()), |
| 35 |
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()), |
| 36 |
] |
| 37 |
) |