]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - testsuite/Makefile
ip/tunnel: Use print_0xhex() instead of print_string()
[mirror_iproute2.git] / testsuite / Makefile
index 2027650051d48a451d5c02f776d6427416d6c237..2a54e5c845e65da6cc61678ebe082301b60d8336 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ## -- Config --
 DEV := lo
 PREFIX := sudo -E unshare -n
@@ -15,6 +16,13 @@ IPVERS := $(filter-out iproute2/Makefile,$(wildcard iproute2/*))
 
 ifneq (,$(wildcard /proc/config.gz))
        KENV := $(shell cat /proc/config.gz | gunzip | grep ^CONFIG)
+else
+KVER := $(shell uname -r)
+KCPATHS := /lib/modules/$(KVER)/config /boot/config-$(KVER)
+KCPATH := $(firstword $(wildcard $(KCPATHS)))
+ifneq (,$(KCPATH))
+       KENV := $(shell cat ${KCPATH} | grep ^CONFIG)
+endif
 endif
 
 .PHONY: compile listtests alltests configure $(TESTS)
@@ -43,6 +51,8 @@ $(TESTS): clean
 ifeq (,$(HAVE_UNSHARED_UTIL))
        $(error Please install util-linux tools to run tests in separated network namespace)
 endif
+       @./tools/generate_nlmsg
+
        @mkdir -p $(RESULTS_DIR)
        
        @for d in $(TESTS_DIR); do \