From: Nathan Rossi Date: Wed, 28 Aug 2019 05:06:29 +0000 (+0000) Subject: binutils: Add do_check task for executing binutils test suite X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a84bdc8c46ee3b49137b7d064c77542e39bfc821;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git binutils: Add do_check task for executing binutils test suite Create the do_check task to the binutils-cross include. This task can be used to execute the binutils test suite for the cross target binutils. By default this executes all the check targets of the binutils Makefile, this can however be changed by setting MAKE_CHECK_TARGETS to the desired test suite target (e.g. check-gas). The binutils test suites do not require any target execution, as such the check target can be run without QEMU or a target device. However since the binutils tests do rely on a C compiler there is dependence on both gcc and libc in order to run the tests. Signed-off-by: Nathan Rossi Signed-off-by: Armin Kuster --- diff --git a/meta/recipes-devtools/binutils/binutils-cross.inc b/meta/recipes-devtools/binutils/binutils-cross.inc index 02ec891606d..76eb453f0e2 100644 --- a/meta/recipes-devtools/binutils/binutils-cross.inc +++ b/meta/recipes-devtools/binutils/binutils-cross.inc @@ -36,3 +36,31 @@ do_install () { rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}64 || : rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${prefix} || : } + +EXTRA_OEMAKE_prepend_task-check = "${PARALLEL_MAKE} " +MAKE_CHECK_TARGETS ??= "check-binutils check-gas check-gold check-ld check-libiberty" + +python () { + # crosssdk deps have different virtual targets + if bb.data.inherits_class('crosssdk', d): + d.appendVarFlag("do_check", "depends", " virtual/${TARGET_PREFIX}gcc-crosssdk:do_populate_sysroot") + d.appendVarFlag("do_check", "depends", " virtual/nativesdk-${TARGET_PREFIX}compilerlibs:do_populate_sysroot") + else: + d.appendVarFlag("do_check", "depends", " virtual/${TARGET_PREFIX}gcc:do_populate_sysroot") + d.appendVarFlag("do_check", "depends", " virtual/${TARGET_PREFIX}compilerlibs:do_populate_sysroot") +} + +do_check[depends] += "dejagnu-native:do_populate_sysroot expect-native:do_populate_sysroot" +do_check[depends] += "virtual/libc:do_populate_sysroot" +do_check[dirs] = "${B}" +do_check[nostamp] = "1" +do_check() { + # need to inject CC and CXX as the target CC and CXX with sysroot + oe_runmake -i ${MAKE_CHECK_TARGETS} \ + RUNTESTFLAGS=" \ + CC='${TARGET_PREFIX}gcc --sysroot=${STAGING_DIR_TARGET} ${TUNE_CCARGS}' \ + CXX='${TARGET_PREFIX}g++ --sysroot=${STAGING_DIR_TARGET} ${TUNE_CCARGS}' \ + " +} +addtask check after do_compile +