From: Evan Hunt Date: Thu, 23 Apr 2020 23:22:21 +0000 (-0700) Subject: Restore behaviour of "make test" and "make unit" X-Git-Tag: v9.17.2~121^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=17a1bafc08b23f182131808771c09c1ebeed4ab1;p=thirdparty%2Fbind9.git Restore behaviour of "make test" and "make unit" Add recursive "test" and "unit" rules, which execute "make check" in specific directories - "make test" runs the system tests, and "make unit" runs the unit tests. --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0565580d992..b0662fc1de3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -320,7 +320,7 @@ stages: before_script: - *setup_softhsm script: - - cd lib && make -j${TEST_PARALLEL_JOBS:-1} -k check V=1 + - make -j${TEST_PARALLEL_JOBS:-1} -k unit V=1 .unit_test: &unit_test_job <<: *unit_test_common diff --git a/bin/tests/system/Makefile.am b/bin/tests/system/Makefile.am index 0dda39f679d..ea4d13a9344 100644 --- a/bin/tests/system/Makefile.am +++ b/bin/tests/system/Makefile.am @@ -176,3 +176,5 @@ $(TESTS): run.sh clean-local: -rm -f get_ports.state get_ports.lock + +test-local: check diff --git a/configure.ac b/configure.ac index 36d038b8109..8ad62afb270 100644 --- a/configure.ac +++ b/configure.ac @@ -58,6 +58,7 @@ AC_DEFINE([PACKAGE_BUILDER], ["make"], [make or Visual Studio]) AC_CONFIG_SRCDIR([bin/named/main.c]) AM_INIT_AUTOMAKE([foreign subdir-objects dist-xz -Wall -Werror]) AM_SILENT_RULES([yes]) +AM_EXTRA_RECURSIVE_TARGETS([test unit]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) diff --git a/lib/dns/tests/Makefile.am b/lib/dns/tests/Makefile.am index 177cadec1a4..1ce71637732 100644 --- a/lib/dns/tests/Makefile.am +++ b/lib/dns/tests/Makefile.am @@ -106,3 +106,5 @@ dst_test_CPPFLAGS = \ rsa_test_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(OPENSSL_CFLAGS) + +unit-local: check diff --git a/lib/irs/tests/Makefile.am b/lib/irs/tests/Makefile.am index 5dc892cf394..0246f34cc79 100644 --- a/lib/irs/tests/Makefile.am +++ b/lib/irs/tests/Makefile.am @@ -13,3 +13,5 @@ check_PROGRAMS = \ resconf_test TESTS = $(check_PROGRAMS) + +unit-local: check diff --git a/lib/isc/tests/Makefile.am b/lib/isc/tests/Makefile.am index 9a0dc87e290..554e8064531 100644 --- a/lib/isc/tests/Makefile.am +++ b/lib/isc/tests/Makefile.am @@ -63,3 +63,5 @@ md_test_LDADD = \ random_test_LDADD = \ $(LDADD) \ -lm + +unit-local: check diff --git a/lib/isccc/tests/Makefile.am b/lib/isccc/tests/Makefile.am index 000e5c8d423..a0b5abd3b82 100644 --- a/lib/isccc/tests/Makefile.am +++ b/lib/isccc/tests/Makefile.am @@ -13,3 +13,5 @@ check_PROGRAMS = \ result_test TESTS = $(check_PROGRAMS) + +unit-local: check diff --git a/lib/isccfg/tests/Makefile.am b/lib/isccfg/tests/Makefile.am index 9f31441bb22..42242ad0705 100644 --- a/lib/isccfg/tests/Makefile.am +++ b/lib/isccfg/tests/Makefile.am @@ -15,3 +15,5 @@ check_PROGRAMS = \ parser_test TESTS = $(check_PROGRAMS) + +unit-local: check diff --git a/lib/ns/tests/Makefile.am b/lib/ns/tests/Makefile.am index 76145db5716..c7ff73cd316 100644 --- a/lib/ns/tests/Makefile.am +++ b/lib/ns/tests/Makefile.am @@ -43,3 +43,5 @@ query_test_LDFLAGS = \ -Wl,--wrap=isc_nmhandle_unref endif + +unit-local: check