]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
testsuite: Search kernel config in modules dir also
authorPhil Sutter <phil@nwl.cc>
Thu, 9 Feb 2017 10:50:55 +0000 (11:50 +0100)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 10 Feb 2017 01:28:48 +0000 (17:28 -0800)
At least in Fedora there is no /proc/config.gz but instead
/lib/modules/`uname -r`/config, so use that as a fallback.

Signed-off-by: Phil Sutter <phil@nwl.cc>
testsuite/Makefile

index fa7ddb8620754e4b22a7104e3f18f804d5ac0207..50a7bafaca89764d0e9a661216bb021aa7cb95ab 100644 (file)
@@ -15,6 +15,12 @@ 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)
+KCPATH := /lib/modules/${KVER}/config
+ifneq (,$(wildcard ${KCPATH}))
+       KENV := $(shell cat ${KCPATH} | grep ^CONFIG)
+endif
 endif
 
 .PHONY: compile listtests alltests configure $(TESTS)