From bb6b691c574ecc891528947f92be227fb6bcf872 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Tue, 26 Feb 2019 12:32:04 +0000 Subject: driconf: add DTD to allow the drirc xml (00-mesa-defaults.conf) to be validated This DTD can be used to validate the drirc xml: $ xmllint --noout --valid 00-mesa-defaults.conf Signed-off-by: Eric Engestrom Reviewed-by: Emil Velikov --- src/util/00-mesa-defaults.conf | 13 +++++++++++++ src/util/meson.build | 16 +++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) (limited to 'src/util') diff --git a/src/util/00-mesa-defaults.conf b/src/util/00-mesa-defaults.conf index f5405a0da84..320de83a619 100644 --- a/src/util/00-mesa-defaults.conf +++ b/src/util/00-mesa-defaults.conf @@ -1,3 +1,4 @@ + + + + + + + + +]> + diff --git a/src/util/meson.build b/src/util/meson.build index 397c2228129..4f64681f191 100644 --- a/src/util/meson.build +++ b/src/util/meson.build @@ -100,7 +100,21 @@ files_mesa_util = files( 'vma.h', ) -install_data('00-mesa-defaults.conf', install_dir : join_paths(get_option('datadir'), 'drirc.d')) +files_drirc = files('00-mesa-defaults.conf') + +install_data(files_drirc, install_dir : join_paths(get_option('datadir'), 'drirc.d')) + +if with_tests + prog_xmllint = find_program('xmllint', required : false, native : true) + if prog_xmllint.found() + test( + 'drirc xml validation', + prog_xmllint, + args : ['--noout', '--valid', files_drirc], + suite : ['util'], + ) + endif +endif files_xmlconfig = files( 'xmlconfig.c', -- cgit v1.2.3