summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Rossi <nathan@nathanrossi.com>2019-08-28 05:06:29 +0000
committerArmin Kuster <akuster808@gmail.com>2019-08-30 15:29:47 -0700
commita84bdc8c46ee3b49137b7d064c77542e39bfc821 (patch)
tree540f453595f686cf15897692111b56c374563c45
parente09f916e2b5ff8c7cef7cfd13b43a7f9d2463346 (diff)
downloadopenembedded-core-contrib-a84bdc8c46ee3b49137b7d064c77542e39bfc821.tar.gz
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 <nathan@nathanrossi.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross.inc28
1 files changed, 28 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-cross.inc b/meta/recipes-devtools/binutils/binutils-cross.inc
index 02ec891606..76eb453f0e 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
+