diff --git a/Makefile.am b/Makefile.am index f491aa2c..fe325c74 100644 --- a/Makefile.am +++ b/Makefile.am @@ -176,11 +176,11 @@ check-local: $(CHECKER) ./testModule$(EXEEXT) $(CHECKER) ./runxmlconf$(EXEEXT) -d $(srcdir)/xmlconf $(CHECKER) ./runsuite$(EXEEXT) +if WITH_OUTPUT_SOURCES if WITH_DEBUG_SOURCES test/scripts/test.sh ./xmllint$(EXEEXT) endif if WITH_CATALOG_SOURCES -if WITH_OUTPUT_SOURCES ASAN_OPTIONS=detect_leaks=0 test/catalogs/test.sh ./xmlcatalog$(EXEEXT) endif endif diff --git a/meson.build b/meson.build index 9d221723..72a2cf5a 100644 --- a/meson.build +++ b/meson.build @@ -534,18 +534,20 @@ foreach check, deps : checks endif endforeach -sh = find_program('sh', required: false) +if want_output + sh = find_program('sh', required: false) -if sh.found() - if want_debug - test('xmllint shell', sh, - args: [ 'test/scripts/test.sh', xmllint.full_path() ], - workdir: meson.current_source_dir()) - endif - if want_catalog and want_output - test('xmlcatalog shell', sh, - args: [ 'test/catalogs/test.sh', xmlcatalog.full_path() ], - workdir: meson.current_source_dir()) + if sh.found() + if want_debug + test('xmllint shell', sh, + args: [ 'test/scripts/test.sh', xmllint.full_path() ], + workdir: meson.current_source_dir()) + endif + if want_catalog + test('xmlcatalog shell', sh, + args: [ 'test/catalogs/test.sh', xmlcatalog.full_path() ], + workdir: meson.current_source_dir()) + endif endif endif diff --git a/runsuite.c b/runsuite.c index 3135412a..ed6fb58a 100644 --- a/runsuite.c +++ b/runsuite.c @@ -17,8 +17,9 @@ #include #include #include + #if (defined(LIBXML_RELAXNG_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)) && \ - defined(LIBXML_XPATH_ENABLED) + defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) #include #include diff --git a/testparser.c b/testparser.c index a324128b..4a9568da 100644 --- a/testparser.c +++ b/testparser.c @@ -621,6 +621,7 @@ testHtmlIds(void) { #define MHE "meta http-equiv=\"Content-Type\"" +#ifdef LIBXML_OUTPUT_ENABLED static int testHtmlInsertMetaEncoding(void) { /* We currently require a head element to be present. */ @@ -741,6 +742,7 @@ testHtmlUpdateMetaEncoding(void) { xmlFreeDoc(doc); return err; } +#endif /* LIBXML_OUTPUT_ENABLED */ #ifdef LIBXML_PUSH_ENABLED static int @@ -806,6 +808,7 @@ testReaderEncoding(void) { return err; } +#ifdef LIBXML_OUTPUT_ENABLED static int testReaderContent(void) { xmlTextReader *reader; @@ -840,6 +843,7 @@ testReaderContent(void) { xmlFreeTextReader(reader); return err; } +#endif /* LIBXML_OUTPUT_ENABLED */ static int testReaderNode(xmlTextReader *reader) { @@ -1424,15 +1428,19 @@ main(void) { #endif #ifdef LIBXML_HTML_ENABLED err |= testHtmlIds(); +#ifdef LIBXML_OUTPUT_ENABLED err |= testHtmlInsertMetaEncoding(); err |= testHtmlUpdateMetaEncoding(); +#endif #ifdef LIBXML_PUSH_ENABLED err |= testHtmlPushWithEncoding(); #endif #endif #ifdef LIBXML_READER_ENABLED err |= testReaderEncoding(); +#ifdef LIBXML_OUTPUT_ENABLED err |= testReaderContent(); +#endif err |= testReader(); #ifdef LIBXML_XINCLUDE_ENABLED err |= testReaderXIncludeError();