diff options
author | Uli Schlachter <psychon@znc.in> | 2021-05-14 17:08:02 +0200 |
---|---|---|
committer | Uli Schlachter <psychon@znc.in> | 2021-05-14 17:08:02 +0200 |
commit | 1c5b4716f727584373178ff5aa46d6f2df400b84 (patch) | |
tree | e45d8a63f6cc56907c5f5d9ecb1460ae886cff22 /src/meson.build | |
parent | 7c7b4e35bc9ea281720ccb31c8f4d5440ee489e5 (diff) | |
download | cairo-1c5b4716f727584373178ff5aa46d6f2df400b84.tar.gz |
meson: Add shell script tests
There are a couple of shell scripts in src/ that run various tests. This
commit adds them to the meson build.
The one exception is check-def.sh, which I couldn't get to work and thus
only add it commented out.
check-headers.sh and check-plt.sh required some tweaking to get them to
work. check-plt.sh will print an error when run since the file
'.libs/lib*.so' does not exist, but it will still run its check
correctly.
Diffstat (limited to 'src/meson.build')
-rw-r--r-- | src/meson.build | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/meson.build b/src/meson.build index 2905fdc8a..d04b4976c 100644 --- a/src/meson.build +++ b/src/meson.build @@ -319,3 +319,30 @@ pkgmod.generate(libcairo, meson.override_dependency('cairo', libcairo_dep) install_headers(cairo_headers, subdir: 'cairo') + +shell = find_program('sh', required: false) +if shell.found() + test_scripts = [ + # This script calls back into make to generate cairo.def + # TODO: Make this work, somehow + #'check-def.sh', + 'check-doc-syntax.sh', + 'check-headers.sh', + 'check-preprocessor-syntax.sh', + ] + + foreach test_script: test_scripts + test(test_script, shell, + args: [test_script], + workdir: meson.current_source_dir()) + endforeach + + env = environment() + env.set('CAIRO_HAS_HIDDEN_SYMBOLS', '1') + + test('check-plt.sh', shell, + args: ['check-plt.sh', libcairo ], + env: env, + workdir: meson.current_source_dir()) + +endif |