]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Use pytest runner for make check
authorTom Krizek <tkrizek@isc.org>
Thu, 31 Aug 2023 11:15:24 +0000 (13:15 +0200)
committerTom Krizek <tkrizek@isc.org>
Tue, 19 Sep 2023 12:47:45 +0000 (14:47 +0200)
Make python & pytest required dependencies to run system tests and
invoke the pytest runner from the makefile.

bin/tests/system/Makefile.am

index 3607451e4ec06880d05ebd755f8d9d79909239e4..b1e5be1869a471f7dc33319cabc43bab31e626d1 100644 (file)
@@ -24,6 +24,8 @@ LDADD +=                      \
        $(LIBDNS_LIBS)
 
 if HAVE_PERL
+if HAVE_PYTHON
+if HAVE_PYTEST
 
 noinst_PROGRAMS =              \
        feature-test            \
@@ -97,10 +99,12 @@ TESTS +=                    \
        catz                    \
        cds                     \
        checkconf               \
+       checkds                 \
        checknames              \
        checkzone               \
        database                \
        dialup                  \
+       dispatch                \
        dlzexternal             \
        dns64                   \
        dsdigest                \
@@ -121,6 +125,7 @@ TESTS +=                    \
        hooks                   \
        host                    \
        journal                 \
+       kasp                    \
        keepalive               \
        keyfromlabel            \
        legacy                  \
@@ -131,28 +136,34 @@ TESTS +=                  \
        metadata                \
        mirror                  \
        mkeys                   \
+       multisigner             \
        names                   \
        notify                  \
        nsec3                   \
        nslookup                \
        padding                 \
        pending                 \
+       pipelined               \
        redirect                \
        rndc                    \
        rootkeysentinel         \
        rpz                     \
+       rpzextra                \
        rrchecker               \
        rrl                     \
        rrsetorder              \
        rsabigexponent          \
        runtime                 \
        sfcache                 \
+       shutdown                \
        smartsign               \
        sortlist                \
        spf                     \
        staticstub              \
        stub                    \
        synthfromdnssec         \
+       tcp                     \
+       timeouts                \
        tools                   \
        transport-acl           \
        tsig                    \
@@ -199,13 +210,6 @@ endif HAVE_PERLMOD_NET_DNS_NAMESERVER
 
 endif HAVE_PERLMOD_NET_DNS
 
-if HAVE_PYTHON
-TESTS += kasp multisigner tcp pipelined
-
-if HAVE_PYTEST
-TESTS += checkds dispatch rpzextra shutdown timeouts
-endif
-
 if HAVE_PYMOD_DNS
 TESTS += qmin cookie
 if HAVE_PERLMOD_NET_DNS
@@ -216,8 +220,16 @@ endif HAVE_PERLMOD_NET_DNS_NAMESERVER
 endif HAVE_PERLMOD_NET_DNS
 endif HAVE_PYMOD_DNS
 
-endif HAVE_PYTHON
-
+else !HAVE_PYTEST
+check:
+       echo pytest is not available, no tests were ran
+       exit 1
+endif !HAVE_PYTEST
+else !HAVE_PYTHON
+check:
+       echo Python is not available, no tests were ran
+       exit 1
+endif !HAVE_PYTHON
 else !HAVE_PERL
 check:
        echo Perl is not available, no tests were ran
@@ -232,10 +244,7 @@ LOG_DRIVER_V_1 = --verbose yes
 LOG_DRIVER = $(srcdir)/custom-test-driver
 AM_LOG_DRIVER_FLAGS = $(LOG_DRIVER_V)
 
-LOG_COMPILER = $(builddir)/legacy.run.sh
-AM_LOG_FLAGS = -r
-
-$(TESTS): legacy.run.sh
+LOG_COMPILER = $(srcdir)/run.sh
 
 test-local: check