diff mbox series

[nft,v2,1/5] build: add basic "check-{local,more,all}" and "build-all" make targets

Message ID 20231105150955.349966-2-thaller@redhat.com
State New
Headers show
Series add infrastructure for unit tests | expand

Commit Message

Thomas Haller Nov. 5, 2023, 3:08 p.m. UTC
Add targets "check-local" and "check-more", which later will hook
up additional tests. For now, they are empty targets.

- with autotools, `make distcheck` implies `make check`.
- with autotools, `make check` implies `make check-local` and `make
  check-TESTS`.

Most tests should of course hook via `check-local` or via `TESTS=`
(`check-TESTS`). There is a small place for additional tests, in
particular "tests/build/run-tests.sh", which itself runs `make
distcheck`. So `make check-more` contains additional tests not run by
`make check`.

And `make check-all` just means `make check check-more`.

Signed-off-by: Thomas Haller <thaller@redhat.com>
---
 Makefile.am | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
diff mbox series

Patch

diff --git a/Makefile.am b/Makefile.am
index 0ed831a19e95..93bd47970077 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -31,8 +31,11 @@  lib_LTLIBRARIES =
 noinst_LTLIBRARIES =
 sbin_PROGRAMS =
 check_PROGRAMS =
+check_LTLIBRARIES =
 dist_man_MANS =
 CLEANFILES =
+check_local =
+check_more =
 
 ###############################################################################
 
@@ -409,3 +412,23 @@  EXTRA_DIST += \
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libnftables.pc
+
+###############################################################################
+
+build-all: all $(check_PROGRAMS) $(check_LTLIBRARIES)
+
+.PHONY: build-all
+
+###############################################################################
+
+check-local: build-all $(check_local)
+
+.PHONY: check-local $(check_local)
+
+check-more: build-all $(check_more)
+
+.PHONY: check-more $(check_more)
+
+check-all: check check-more
+
+.PHONY: check-all