coverage.sh: Cover XML_DTD undefined (with and without XML_GE)

This commit is contained in:
Sebastian Pipping 2023-10-27 02:08:16 +02:00
parent cdead241d4
commit d269f90975

View file

@ -68,7 +68,17 @@ _get_build_dir() {
m32_part=__m32
fi
echo "build__${version}__xml_context_${xml_context}${libbsd_part}${mingw_part}${char_part}${xml_attr_part}${m32_part}"
local ge_part=
if ${with_ge}; then
ge_part=__ge
fi
local dtd_part=
if ${with_dtd}; then
dtd_part=__dtd
fi
echo "build__${version}__xml_context_${xml_context}${libbsd_part}${mingw_part}${char_part}${ge_part}${dtd_part}${xml_attr_part}${m32_part}"
}
@ -95,6 +105,8 @@ _call_cmake() {
${with_libbsd} && cmake_args+=( -DEXPAT_WITH_LIBBSD=ON )
${with_mingw} && cmake_args+=( -DCMAKE_TOOLCHAIN_FILE="${abs_source_dir}"/cmake/mingw-toolchain.cmake )
${with_m32} && cmake_args+=( -D_EXPAT_M32=ON )
${with_ge} || cmake_args+=( -DEXPAT_GE=OFF )
${with_dtd} || cmake_args+=( -DEXPAT_DTD=OFF )
(
set -x
@ -184,7 +196,10 @@ _run() {
fi
set -x
make CTEST_OUTPUT_ON_FAILURE=1 test run-xmltest
make CTEST_OUTPUT_ON_FAILURE=1 test
if ${with_dtd}; then
make run-xmltest
fi
lcov -c -d "${capture_dir}" -o "${coverage_info}-test" &>> run.log
lcov \
@ -291,6 +306,8 @@ _main() {
with_unsigned_char=false
with_libbsd=false
with_m32=false
with_dtd=true
with_ge=true
for with_mingw in true false ; do
for unicode_enabled in true false ; do
if ${unicode_enabled} && ! ${with_mingw} ; then
@ -309,6 +326,8 @@ _main() {
with_libbsd=true _build_case
with_unsigned_char=true _build_case
with_m32=true _build_case
with_dtd=false with_ge=true _build_case
with_dtd=false with_ge=false _build_case
echo
echo 'Merging coverage files...'