[libxml2] Simplify 'make check' targets



commit 3f74e42baec10f8bca1262be84298fdec7e0a050
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Mon Apr 4 05:19:33 2022 +0200

    Simplify 'make check' targets

 Makefile.am              | 35 +++++++++++++++--------------------
 fuzz/Makefile.am         |  7 +++----
 python/Makefile.am       |  3 ---
 python/tests/Makefile.am |  4 +---
 4 files changed, 19 insertions(+), 30 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 6d8b70ac..7fbb6381 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -158,30 +158,25 @@ runxmlconf_LDADD= $(LDADDS)
 #testOOM_DEPENDENCIES = $(DEPS)
 #testOOM_LDADD= $(LDADDS)
 
-runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \
-          testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT) \
-          testModule$(EXEEXT) testThreads$(EXEEXT)
+check-local:
        [ -d test   ] || $(LN_S) $(srcdir)/test   .
        [ -d result ] || $(LN_S) $(srcdir)/result .
-       $(CHECKER) ./runtest$(EXEEXT) && \
-           $(CHECKER) ./testrecurse$(EXEEXT) && \
-           ASAN_OPTIONS="$$ASAN_OPTIONS:detect_leaks=0" $(CHECKER) ./testapi$(EXEEXT) && \
-           $(CHECKER) ./testchar$(EXEEXT) && \
-           $(CHECKER) ./testdict$(EXEEXT) && \
-           $(CHECKER) ./testModule$(EXEEXT) && \
-           $(CHECKER) ./testThreads$(EXEEXT) && \
-           $(CHECKER) ./runxmlconf$(EXEEXT)
-       @cd fuzz; $(MAKE) tests
-if WITH_PYTHON
-       @cd python && $(MAKE) tests
-endif
-
-check: all runtests
-
-check-valgrind valgrind: all
+       $(CHECKER) ./runtest$(EXEEXT)
+       $(CHECKER) ./testrecurse$(EXEEXT)
+       ASAN_OPTIONS="$$ASAN_OPTIONS:detect_leaks=0" $(CHECKER) ./testapi$(EXEEXT)
+       $(CHECKER) ./testchar$(EXEEXT)
+       $(CHECKER) ./testdict$(EXEEXT)
+       $(CHECKER) ./testModule$(EXEEXT)
+       $(CHECKER) ./testThreads$(EXEEXT)
+       $(CHECKER) ./runxmlconf$(EXEEXT)
+
+# Compatibility name of the check target
+runtests: check
+
+check-valgrind valgrind:
        @echo '## Running the regression tests under Valgrind'
        @echo '## Go get a cup of coffee it is gonna take a while ...'
-       $(MAKE) CHECKER='valgrind -q' runtests
+       $(MAKE) CHECKER='valgrind -q' check
 
 asan:
        @echo '## rebuilding for ASAN'
diff --git a/fuzz/Makefile.am b/fuzz/Makefile.am
index d4272417..6d598167 100644
--- a/fuzz/Makefile.am
+++ b/fuzz/Makefile.am
@@ -24,14 +24,13 @@ XML_SEED_CORPUS_SRC = \
 
 testFuzzer_SOURCES = testFuzzer.c fuzz.c
 
-.PHONY: tests corpus clean-corpus
+.PHONY: corpus clean-corpus
 
 corpus: seed/html.stamp seed/regexp.stamp seed/schema.stamp seed/uri.stamp \
     seed/xml.stamp seed/xpath.stamp
 
-tests: testFuzzer$(EXEEXT) corpus
-       @echo "## Running fuzzer tests"
-       @./testFuzzer$(EXEEXT)
+check-local: corpus
+       ./testFuzzer$(EXEEXT)
 
 clean-corpus:
        rm -rf seed
diff --git a/python/Makefile.am b/python/Makefile.am
index 2e3bfbf2..d60bb5cc 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -51,6 +51,3 @@ all-local: drv_libxml2.py libxml2.py
 $(GENERATED): $(srcdir)/generator.py $(API_DESC)
        $(PYTHON) $(srcdir)/generator.py $(srcdir)
 endif
-
-tests test: all
-       cd tests && $(MAKE) tests
diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am
index d3c9d3d6..7bb6828a 100644
--- a/python/tests/Makefile.am
+++ b/python/tests/Makefile.am
@@ -59,7 +59,7 @@ XMLS=         \
 CLEANFILES = core tmp.xml *.pyc
 
 if WITH_PYTHON
-tests: $(PYTESTS)
+check-local:
        @for f in $(XMLS) ; do test -f $$f || $(LN_S) $(srcdir)/$$f . ; done
        @echo "## running Python regression tests"
        @(export PYTHONPATH="..:../.libs:$(srcdir)/..:$$PYTHONPATH" ; \
@@ -73,6 +73,4 @@ tests: $(PYTESTS)
              exit 1 ; \
            fi ; \
          done)
-else
-tests:
 endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]