testsuite: Search kernel config in modules dir also

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>
This commit is contained in:
Phil Sutter 2017-02-09 11:50:55 +01:00 committed by Stephen Hemminger
parent 886f2c43b5
commit 3cef95926b

View 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)