[LyX/master] Cmake docbook tests: Check the exported with one more tool
Kornel Benko
kornel at lyx.org
Wed Aug 5 10:30:26 UTC 2020
commit 89feea25f1ad09d72defd907467499669cd49225
Author: Kornel Benko <kornel at lyx.org>
Date: Wed Aug 5 12:54:36 2020 +0200
Cmake docbook tests: Check the exported with one more tool
---
development/autotests/export.cmake | 15 ++++++++++++++-
development/autotests/xmlParser.pl | 11 +++++++++++
2 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/development/autotests/export.cmake b/development/autotests/export.cmake
index 6020990..55ca7a7 100755
--- a/development/autotests/export.cmake
+++ b/development/autotests/export.cmake
@@ -206,7 +206,7 @@ else()
if ($ENV{LYX_DEBUG_LATEX})
set(LyXExtraParams -dbg latex)
else()
- set(LyXExtraParams)
+ set(LyXExtraParams -dbg info)
endif()
if(IgnoreErrorMessage)
foreach (_em ${IgnoreErrorMessage})
@@ -235,6 +235,19 @@ else()
else()
set(xmllint_params)
set(executable_ ${PERL_EXECUTABLE} "${TOP_SRC_DIR}/development/autotests/filterXml4Sax.pl")
+ # Check with perl xml-parser
+ # needs XML::Parser module
+ message(STATUS "Calling ${PERL_EXECUTABLE} \"${TOP_SRC_DIR}/development/autotests/xmlParser.pl\" \"${result_file_name}\"")
+ execute_process(
+ COMMAND ${PERL_EXECUTABLE} "${TOP_SRC_DIR}/development/autotests/xmlParser.pl" "${result_file_name}"
+ OUTPUT_VARIABLE parserout
+ ERROR_VARIABLE parsererr
+ RESULT_VARIABLE _err
+ )
+ if (_err)
+ message(STATUS "${parsererr}")
+ endif()
+ Summary(_err "Checking \"${result_file_name}\" with xmlParser.pl")
endif()
if (XMLLINT_EXECUTABLE)
message(STATUS "Calling: " ${executable_} ${xmllint_params} " ${result_file_name}")
diff --git a/development/autotests/xmlParser.pl b/development/autotests/xmlParser.pl
new file mode 100644
index 0000000..e33cde8
--- /dev/null
+++ b/development/autotests/xmlParser.pl
@@ -0,0 +1,11 @@
+#! /usr/bin/env perl
+
+use strict;
+use XML::Parser;
+
+my $p1 = XML::Parser->new(Style => 'Debug', ErrorContext => 2);
+for my $arg (@ARGV) {
+ $p1->parsefile($arg);
+}
+
+exit(0);
More information about the lyx-cvs
mailing list