diff options
author | Patrick Griffis <pgriffis@igalia.com> | 2022-04-14 12:40:08 -0500 |
---|---|---|
committer | Patrick Griffis <pgriffis@igalia.com> | 2022-04-14 12:47:23 -0500 |
commit | a6581262c62ec39409e614f0e8f6763878a7d37d (patch) | |
tree | f6626920f03e3988e999c8f441e7a2d9f333ec90 | |
parent | 1b51db848bdb17794c4e8184f5a2b582d37ea988 (diff) | |
download | libsoup-a6581262c62ec39409e614f0e8f6763878a7d37d.tar.gz |
build: Add option to validate docs
-rw-r--r-- | docs/reference/meson.build | 11 | ||||
-rw-r--r-- | meson.build | 1 | ||||
-rw-r--r-- | meson_options.txt | 6 |
3 files changed, 18 insertions, 0 deletions
diff --git a/docs/reference/meson.build b/docs/reference/meson.build index d868201c..32f6f748 100644 --- a/docs/reference/meson.build +++ b/docs/reference/meson.build @@ -46,4 +46,15 @@ if gidocgen_dep.found() install: true, install_dir: docs_dir, ) + + if get_option('doc_tests') + test('docs', gidocgen, + args: [ + 'check', + '--add-include-path=@0@'.format(meson.current_build_dir() / '../../libsoup'), + '--config=@0@'.format(libsoup_toml), + soup_gir_gen_sources[0], + ] + ) + endif endif
\ No newline at end of file diff --git a/meson.build b/meson.build index 6ac3ebad..d878d2e9 100644 --- a/meson.build +++ b/meson.build @@ -431,6 +431,7 @@ summary({ 'All tests' : get_option('tests'), 'Tests requiring Apache' : have_apache, 'Tests requiring Quart' : quart_found, + 'Documentation tests' : get_option('doc_tests'), 'Fuzzing tests' : get_option('fuzzing').enabled(), 'Autobahn tests' : have_autobahn, 'PKCS #11 tests' : gnutls_dep.found(), diff --git a/meson_options.txt b/meson_options.txt index 85c09058..64c0e835 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -53,6 +53,12 @@ option('docs', description: 'Enable generating the API reference' ) +option('doc_tests', + type: 'boolean', + value: false, + description: 'Enable strict validation of API docs' +) + option('tests', type: 'boolean', value: true, |