Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | SUMMARY = "Embedded Linux Device Driver Tests based on Linux Test Project" |
| 2 | HOMEPAGE = "http://arago-project.org/git/projects/test-automation/ltp-ddt.git" |
| 3 | SECTION = "console/utils" |
| 4 | LICENSE = "GPLv2" |
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" |
| 6 | |
| 7 | PROVIDES += "ltp" |
| 8 | DEPENDS += "zip-native virtual/kernel alsa-lib" |
| 9 | |
| 10 | RDEPENDS_${PN} += "pm-qa serialcheck" |
| 11 | |
| 12 | inherit autotools module-base kernel-module-split |
| 13 | |
| 14 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 15 | |
| 16 | SRCREV = "f086bed6cc88bf102eaad0e96cb7ebe79944a8ad" |
| 17 | BRANCH ?= "master" |
| 18 | |
| 19 | SRC_URI = "git://arago-project.org/git/projects/test-automation/ltp-ddt.git;branch=${BRANCH} \ |
| 20 | file://ltp-Do-not-link-against-libfl.patch \ |
| 21 | " |
| 22 | |
| 23 | S = "${WORKDIR}/git" |
| 24 | |
| 25 | LTPROOT = "/opt/ltp" |
| 26 | |
| 27 | EXTRA_OEMAKE_append = " \ |
| 28 | prefix=${LTPROOT} \ |
| 29 | CROSS_COMPILE=${HOST_PREFIX} \ |
| 30 | SKIP_IDCHECK=1 \ |
| 31 | KERNEL_PATH=${STAGING_KERNEL_DIR} \ |
| 32 | KERNEL_INC=${STAGING_KERNEL_DIR} \ |
| 33 | KERNEL_USR_INC=${STAGING_INCDIR} \ |
| 34 | ALSA_INCPATH=${STAGING_INCDIR} \ |
| 35 | ALSA_LIBPATH=${STAGING_LIBDIR} \ |
| 36 | PLATFORM=${MACHINE} \ |
| 37 | RANLIB=${RANLIB} \ |
| 38 | DESTDIR=${D} \ |
| 39 | CC='${CC}' \ |
| 40 | KERNEL_CC='${KERNEL_CC}' \ |
| 41 | " |
| 42 | |
| 43 | TARGET_CC_ARCH += "${LDFLAGS}" |
| 44 | |
| 45 | FILES_${PN}-dbg += " \ |
| 46 | ${LTPROOT}/.debug \ |
| 47 | ${LTPROOT}/bin/.debug \ |
| 48 | ${LTPROOT}/runtest/.debug \ |
| 49 | ${LTPROOT}/testcases/bin/.debug \ |
| 50 | ${LTPROOT}/testcases/bin/*/bin/.debug \ |
| 51 | ${LTPROOT}/testcases/bin/*/test/.debug \ |
| 52 | ${LTPROOT}/testcases/bin/ddt/.debug \ |
| 53 | ${LTPROOT}/testcases/bin/ddt/*/bin/.debug \ |
| 54 | ${LTPROOT}/testcases/bin/ddt/*/test/.debug \ |
| 55 | ${LTPROOT}/testcases/realtime/*/*/.debug \ |
| 56 | " |
| 57 | |
| 58 | FILES_${PN}-staticdev += "${LTPROOT}/lib" |
| 59 | FILES_${PN} += "${LTPROOT}/*" |
| 60 | |
| 61 | KERNEL_MODULES_META_PACKAGE = "${PN}" |
| 62 | |
| 63 | kmoddir = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/ddt" |
| 64 | |
| 65 | # ltp doesn't regenerate ffsb-6.0-rc2 configure and hardcode configure call. |
| 66 | # we explicitly force regeneration of that directory and pass configure options. |
| 67 | do_configure_append() { |
| 68 | (cd utils/ffsb-6.0-rc2; autoreconf -fvi; ./configure ${CONFIGUREOPTS}) |
| 69 | } |
| 70 | |
| 71 | # The makefiles make excessive use of make -C and several include testcases.mk |
| 72 | # which triggers a build of the syscall header. To reproduce, build ltp, |
| 73 | # then delete the header, then "make -j XX" and watch regen.sh run multiple |
| 74 | # times. Its easier to generate this once here instead. |
| 75 | do_compile_prepend () { |
| 76 | ( make -C ${B}/testcases/kernel include/linux_syscall_numbers.h ) |
| 77 | } |
| 78 | |
| 79 | do_compile_append () { |
| 80 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS |
| 81 | oe_runmake modules |
| 82 | } |
| 83 | |
| 84 | do_install() { |
| 85 | oe_runmake install |
| 86 | install -d ${D}${datadir} |
| 87 | install -d ${D}${kmoddir} |
| 88 | mv ${D}${LTPROOT}/testcases/bin/ddt/*.ko ${D}${kmoddir} |
| 89 | } |
| 90 | |
| 91 | # do_make_scripts should be a separate task for the lock to work |
| 92 | addtask make_scripts before do_compile |
| 93 | do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock" |
| 94 | do_make_scripts[deptask] = "do_populate_sysroot" |
| 95 | |
| 96 | # http://errors.yoctoproject.org/Errors/Details/56327/ |
| 97 | PNBLACKLIST[ltp-ddt] ?= "BROKEN: fails since last autotools.bbclass changes" |