meson: docs/html: add html test

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
Pavel Hrdina 2020-06-25 18:15:02 +02:00
parent 0996d59d79
commit 700f0aac6d
4 changed files with 28 additions and 26 deletions

View File

@ -20,7 +20,7 @@
# so force it explicitly
DISTCHECK_CONFIGURE_FLAGS = --enable-werror
SUBDIRS = . docs
SUBDIRS = .
XZ_OPT ?= -v -T0
export XZ_OPT

View File

@ -106,7 +106,7 @@ m4_if(m4_version_compare([2.61a.100],
AC_CONFIG_FILES([run],
[chmod +x,-w run])
AC_CONFIG_FILES([\
Makefile docs/Makefile \
Makefile \
.color_coded \
.ycm_extra_conf.py \
libvirt.pc \

View File

@ -1,22 +0,0 @@
## Process this file with automake to produce Makefile.in
## Copyright (C) 2005-2016 Red Hat, Inc.
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with this library. If not, see
## <http://www.gnu.org/licenses/>.
check-html:
$(XMLLINT) --nonet --noout html/*.html
check-local: check-html

View File

@ -7,7 +7,10 @@ apipng = [
install_data(apipng, install_dir: docs_html_dir / 'html')
custom_target(
docs_html_gen = []
docs_html_dep = []
index_api_gen = custom_target(
'index-api',
input: [
newapi_xsl,
@ -43,8 +46,11 @@ custom_target(
],
)
docs_html_gen += index_api_gen.to_list()
docs_html_dep += index_api_gen
foreach name : [ 'admin', 'lxc', 'qemu' ]
custom_target(
index_api_gen = custom_target(
'index-@0@-api'.format(name),
input: [
newapi_xsl,
@ -67,4 +73,22 @@ foreach name : [ 'admin', 'lxc', 'qemu' ]
page_xsl,
],
)
docs_html_gen += index_api_gen.to_list()
docs_html_dep += index_api_gen
endforeach
docs_html_paths = []
foreach file : docs_html_gen
docs_html_paths += file.full_path()
endforeach
test(
'check-html',
xmllint_prog,
args: [
'--nonet', '--noout', docs_html_paths,
],
depends: docs_html_dep,
)