diff options
-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, |