Alexandre Belloni | 8dfd59d | 2013-06-05 23:53:30 +0000 | [diff] [blame] | 1 | ################################################################################ |
Eric Andersen | c184660 | 2003-10-06 08:06:02 +0000 | [diff] [blame] | 2 | # |
| 3 | # ltp-testsuite |
| 4 | # |
Alexandre Belloni | 8dfd59d | 2013-06-05 23:53:30 +0000 | [diff] [blame] | 5 | ################################################################################ |
Gustavo Zacarias | b51099d | 2013-05-05 03:14:35 +0000 | [diff] [blame] | 6 | |
Petr Vorel | 0617844 | 2018-09-27 16:28:27 +0200 | [diff] [blame] | 7 | LTP_TESTSUITE_VERSION = 20180926 |
Thomas De Schampheleire | f268f71 | 2014-10-07 09:06:03 +0200 | [diff] [blame] | 8 | LTP_TESTSUITE_SOURCE = ltp-full-$(LTP_TESTSUITE_VERSION).tar.xz |
Baruch Siach | ae33f02 | 2015-10-20 13:31:56 +0300 | [diff] [blame] | 9 | LTP_TESTSUITE_SITE = https://github.com/linux-test-project/ltp/releases/download/$(LTP_TESTSUITE_VERSION) |
Rahul Bedarkar | af31c30 | 2017-03-30 19:13:32 +0530 | [diff] [blame] | 10 | LTP_TESTSUITE_LICENSE = GPL-2.0, GPL-2.0+ |
Samuel Martin | dbeeaef | 2012-11-21 14:18:19 +0000 | [diff] [blame] | 11 | LTP_TESTSUITE_LICENSE_FILES = COPYING |
Thomas Petazzoni | b57e135 | 2017-03-21 22:21:20 +0100 | [diff] [blame] | 12 | |
Anders Roxell | 0ac29e6 | 2015-09-03 11:01:56 +0200 | [diff] [blame] | 13 | LTP_TESTSUITE_CONF_OPTS += \ |
Ciro Santilli | 4571959 | 2018-05-03 17:03:16 +0100 | [diff] [blame] | 14 | --with-realtime-testsuite --with-open-posix-testsuite |
Eric Andersen | c184660 | 2003-10-06 08:06:02 +0000 | [diff] [blame] | 15 | |
Marc Gonzalez | 44df0ae | 2016-04-05 13:09:40 +0200 | [diff] [blame] | 16 | ifeq ($(BR2_LINUX_KERNEL),y) |
| 17 | LTP_TESTSUITE_DEPENDENCIES += linux |
| 18 | LTP_TESTSUITE_MAKE_ENV += $(LINUX_MAKE_FLAGS) |
| 19 | LTP_TESTSUITE_CONF_OPTS += --with-linux-dir=$(LINUX_DIR) |
| 20 | else |
| 21 | LTP_TESTSUITE_CONF_OPTS += --without-modules |
| 22 | endif |
| 23 | |
Erico Nunes | 01f1961 | 2016-10-01 13:50:22 +0200 | [diff] [blame] | 24 | # We change the prefix to a custom one, otherwise we get scripts and |
| 25 | # directories directly in /usr, such as /usr/runalltests.sh |
| 26 | LTP_TESTSUITE_CONF_OPTS += --prefix=/usr/lib/ltp-testsuite |
| 27 | |
Gustavo Zacarias | b51099d | 2013-05-05 03:14:35 +0000 | [diff] [blame] | 28 | # Needs libcap with file attrs which needs attr, so both required |
| 29 | ifeq ($(BR2_PACKAGE_LIBCAP)$(BR2_PACKAGE_ATTR),yy) |
| 30 | LTP_TESTSUITE_DEPENDENCIES += libcap |
| 31 | else |
| 32 | LTP_TESTSUITE_CONF_ENV += ac_cv_lib_cap_cap_compare=no |
| 33 | endif |
| 34 | |
Baruch Siach | 6ba44a7 | 2018-02-07 21:04:48 +0200 | [diff] [blame] | 35 | # No explicit enable/disable options |
| 36 | ifeq ($(BR2_PACKAGE_NUMACTL),y) |
| 37 | LTP_TESTSUITE_DEPENDENCIES += numactl |
| 38 | else |
| 39 | LTP_TESTSUITE_CONF_ENV += have_numa_headers=no |
| 40 | endif |
| 41 | |
Thomas Petazzoni | ca3524b | 2013-10-06 19:52:25 +0200 | [diff] [blame] | 42 | # ltp-testsuite uses <fts.h>, which isn't compatible with largefile |
| 43 | # support. |
Thomas De Schampheleire | baedef9 | 2015-07-26 20:43:14 +0200 | [diff] [blame] | 44 | LTP_TESTSUITE_CFLAGS = $(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS)) |
| 45 | LTP_TESTSUITE_CPPFLAGS = $(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS)) |
Thomas De Schampheleire | 3b946ee | 2015-12-11 09:51:41 +0100 | [diff] [blame] | 46 | LTP_TESTSUITE_LIBS = |
| 47 | |
| 48 | ifeq ($(BR2_PACKAGE_LIBTIRPC),y) |
| 49 | LTP_TESTSUITE_DEPENDENCIES += libtirpc host-pkgconf |
| 50 | LTP_TESTSUITE_CFLAGS += "`$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`" |
| 51 | LTP_TESTSUITE_LIBS += "`$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`" |
| 52 | endif |
Thomas De Schampheleire | baedef9 | 2015-07-26 20:43:14 +0200 | [diff] [blame] | 53 | |
Thomas Petazzoni | ca3524b | 2013-10-06 19:52:25 +0200 | [diff] [blame] | 54 | LTP_TESTSUITE_CONF_ENV += \ |
Thomas De Schampheleire | baedef9 | 2015-07-26 20:43:14 +0200 | [diff] [blame] | 55 | CFLAGS="$(LTP_TESTSUITE_CFLAGS)" \ |
| 56 | CPPFLAGS="$(LTP_TESTSUITE_CPPFLAGS)" \ |
Thomas De Schampheleire | 3b946ee | 2015-12-11 09:51:41 +0100 | [diff] [blame] | 57 | LIBS="$(LTP_TESTSUITE_LIBS)" \ |
Petr Vorel | a9ef70a | 2018-01-30 22:23:49 +0100 | [diff] [blame] | 58 | SYSROOT="$(STAGING_DIR)" |
| 59 | |
Waldemar Brodkorb | 7f82fe9 | 2016-03-05 11:39:54 +0100 | [diff] [blame] | 60 | # Requires uClibc fts and bessel support, normally not enabled |
| 61 | ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) |
| 62 | define LTP_TESTSUITE_REMOVE_UNSUPPORTED |
Jerzy Grzegorek | 882dd60 | 2016-03-08 22:58:05 +0100 | [diff] [blame] | 63 | rm -rf $(@D)/testcases/kernel/controllers/cpuset/ |
| 64 | rm -rf $(@D)/testcases/misc/math/float/bessel/ |
| 65 | rm -f $(@D)/testcases/misc/math/float/float_bessel.c |
Waldemar Brodkorb | 7f82fe9 | 2016-03-05 11:39:54 +0100 | [diff] [blame] | 66 | endef |
| 67 | LTP_TESTSUITE_POST_PATCH_HOOKS += LTP_TESTSUITE_REMOVE_UNSUPPORTED |
| 68 | endif |
| 69 | |
Romain Naour | bb98e42 | 2017-05-09 22:59:27 +0200 | [diff] [blame] | 70 | # ldd command build system tries to build a shared library unconditionally. |
| 71 | ifeq ($(BR2_STATIC_LIBS),y) |
| 72 | define LTP_TESTSUITE_REMOVE_LDD |
| 73 | rm -rf $(@D)/testcases/commands/ldd |
| 74 | endef |
| 75 | LTP_TESTSUITE_POST_PATCH_HOOKS += LTP_TESTSUITE_REMOVE_LDD |
| 76 | endif |
| 77 | |
Arnout Vandecappelle (Essensium/Mind) | e1502eb | 2012-07-03 00:07:32 +0200 | [diff] [blame] | 78 | $(eval $(autotools-package)) |