ltp-testsuite: build kernel modules when appropriate
authorMarc Gonzalez <marc_gonzalez@sigmadesigns.com>
Tue, 5 Apr 2016 11:09:40 +0000 (13:09 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 18 Apr 2016 19:40:11 +0000 (21:40 +0200)
If we're building a kernel, we can also build LTP's test modules.

Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/ltp-testsuite/ltp-testsuite.mk

index 8adfdef68d69ea2dab3edf9bfd73df92cca36dce..cf48072f81e352f819dad4e9f42ec3e9d4e9c4fc 100644 (file)
@@ -13,6 +13,14 @@ LTP_TESTSUITE_CONF_OPTS += \
        --with-power-management-testsuite \
        --with-realtime-testsuite
 
+ifeq ($(BR2_LINUX_KERNEL),y)
+LTP_TESTSUITE_DEPENDENCIES += linux
+LTP_TESTSUITE_MAKE_ENV += $(LINUX_MAKE_FLAGS)
+LTP_TESTSUITE_CONF_OPTS += --with-linux-dir=$(LINUX_DIR)
+else
+LTP_TESTSUITE_CONF_OPTS += --without-modules
+endif
+
 # Needs libcap with file attrs which needs attr, so both required
 ifeq ($(BR2_PACKAGE_LIBCAP)$(BR2_PACKAGE_ATTR),yy)
 LTP_TESTSUITE_DEPENDENCIES += libcap