summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2024-05-17 13:35:55 (GMT)
committerThomas Haller <thaller@redhat.com>2024-05-17 13:56:51 (GMT)
commit71e59e145ebe03ab18400e8800ca7d119ae5b9b1 (patch)
tree19bcfd040becbe17df40a34937ff07bc00cadfd2
parent8539b7d39fd70e8958d6a339299b64cd4862b882 (diff)
downloadlibnl-71e59e145ebe03ab18400e8800ca7d119ae5b9b1.zip
libnl-71e59e145ebe03ab18400e8800ca7d119ae5b9b1.tar.gz
libnl-71e59e145ebe03ab18400e8800ca7d119ae5b9b1.tar.bz2
build: separate build tests from unit tests
The build tests spam the terminal output of the CI run. Make them a separate build target (check-build), so we can run them first.
-rw-r--r--.github/workflows/ci.yml10
-rw-r--r--Makefile.am19
2 files changed, 18 insertions, 11 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7785b18..702a6f0 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -86,7 +86,8 @@ jobs:
shell: bash
- name: Build Unit Tests
- run: make -j 5 check-progs
+ run: |
+ make -j 5 check-build
- name: Run Unit Tests
run: |
@@ -140,7 +141,7 @@ jobs:
cd build
../configure --disable-static
make -j 5
- make -j 5 check-progs
+ make -j 5 check-build
export NLTST_SEED_RAND=
make -j 5 check
@@ -201,7 +202,10 @@ jobs:
./autogen.sh
./configure
make -j 5
- make -j 5 check-progs
+
+ - name: Build Unit Tests
+ run: |
+ make -j 5 check-build
- name: Run Unit Tests
run: |
diff --git a/Makefile.am b/Makefile.am
index 496a640..762782d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,6 +9,7 @@ check_LTLIBRARIES =
check_PROGRAMS =
check_programs =
check_local =
+check_build =
bin_PROGRAMS =
sbin_PROGRAMS =
@@ -1145,34 +1146,34 @@ BUILD_HEADERS_OBJS = $(patsubst %,%.build-headers-test.o,$(public_headers))
# Test whether the public headers are all self-contained and can be build.
# This test is not hooked up as `make check`.
-check-local-build-headers: $(BUILD_HEADERS_OBJS)
+check-build-headers: $(BUILD_HEADERS_OBJS)
CLEANFILES += $(BUILD_HEADERS_OBJS)
-check_local += check-local-build-headers
+check_build += check-build-headers
###############################################################################
if HAS_CXX
-%.build-headers-test-cxx.c: %
+%.build-headers-test-cxx.cpp: %
mkdir -p "$(dir $@)"
printf "#include <cstdio>\n#include <$$(echo "$<" | sed 's|.*\<include/netlink/|netlink/|')>\nint main(void) { return 0; }" > $@
-%.build-headers-test-cxx.o: %.build-headers-test-cxx.c %.build-headers-test.o
+%.build-headers-test-cxx.o: %.build-headers-test-cxx.cpp %.build-headers-test.o
$(CXX) -Wall -Werror -D_NL_NO_WARN_DEPRECATED_HEADER -I$(srcdir)/include -I$(builddir)/include -c -o $@ $<
BUILD_HEADERS_OBJS_CXX = $(patsubst %,%.build-headers-test-cxx.o,$(public_headers))
CLEANFILES += $(BUILD_HEADERS_OBJS_CXX)
-check-local-build-headers-cxx: $(BUILD_HEADERS_OBJS_CXX)
+check-build-headers-cxx: $(BUILD_HEADERS_OBJS_CXX)
-check_local += check-local-build-headers-cxx
+check_build += check-build-headers-cxx
endif
###############################################################################
-check-local: $(check_local)
+check-local: $(check_build) $(check_local)
.PHONY: $(check_local)
@@ -1201,7 +1202,9 @@ EXTRA_DIST += \
###############################################################################
-check-progs: all $(check_PROGRAMS) $(check_LTLIBRARIES)
+check-build: all $(check_PROGRAMS) $(check_LTLIBRARIES) $(check_build)
+
+check-progs: $(check_build)
.PHONY: check-progs