From cfcea649761b64fe175d8ff65265b4022b53feb1 Mon Sep 17 00:00:00 2001 From: Junjie Mao Date: Mon, 7 Feb 2022 18:06:23 +0800 Subject: [PATCH] config_tools: add schema of checker schemas This patch adds a (meta) XML schema of those XML schema files specifying the validation rules (using xs:assert constructs). This provide integrators with a mechanism to confirm the well-formedness of those rules, especially the customized annotations for advanced error reporting. Tracked-On: #6690 Signed-off-by: Junjie Mao --- .../schema/checks/check_the_checkers.sh | 9 ++++ .../checks/schema_of_checks/custom_annot.xsd | 18 ++++++++ .../schema/checks/schema_of_checks/main.xsd | 41 +++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100755 misc/config_tools/schema/checks/check_the_checkers.sh create mode 100644 misc/config_tools/schema/checks/schema_of_checks/custom_annot.xsd create mode 100644 misc/config_tools/schema/checks/schema_of_checks/main.xsd diff --git a/misc/config_tools/schema/checks/check_the_checkers.sh b/misc/config_tools/schema/checks/check_the_checkers.sh new file mode 100755 index 000000000..754ffc6ee --- /dev/null +++ b/misc/config_tools/schema/checks/check_the_checkers.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# Copyright (C) 2022 Intel Corporation. +# SPDX-License-Identifier: BSD-3-Clause + +checks_dir=$(dirname $0) +for checker in ${checks_dir}/*.xsd; do + xmllint --noout --schema ${checks_dir}/schema_of_checks/main.xsd ${checker} +done diff --git a/misc/config_tools/schema/checks/schema_of_checks/custom_annot.xsd b/misc/config_tools/schema/checks/schema_of_checks/custom_annot.xsd new file mode 100644 index 000000000..4c6e231bc --- /dev/null +++ b/misc/config_tools/schema/checks/schema_of_checks/custom_annot.xsd @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + diff --git a/misc/config_tools/schema/checks/schema_of_checks/main.xsd b/misc/config_tools/schema/checks/schema_of_checks/main.xsd new file mode 100644 index 000000000..cee0ea9b7 --- /dev/null +++ b/misc/config_tools/schema/checks/schema_of_checks/main.xsd @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +