diff options
author | Lukasz Majewski <lukma@denx.de> | 2021-09-30 12:43:56 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-18 13:48:12 +0100 |
commit | 4ee26ef672c75e73b10412e87cee23797105d9bc (patch) | |
tree | 308a20e2707840dec74705afdae775130fc7da10 /meta/recipes-core/glibc/glibc-tests.inc | |
parent | db2f3df621ada3f4a87136279fc8015f81a6ad0c (diff) | |
download | openembedded-core-contrib-4ee26ef672c75e73b10412e87cee23797105d9bc.tar.gz |
glibc: Extract common code to build tests to glibc-tests.inc
The common code to build tests has been extracted from glibc-testsuite
recipe to glibc-tests.inc
This code will be reused in the recipe necessary for providing glibc
tests executed with ptest framework.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glibc/glibc-tests.inc')
-rw-r--r-- | meta/recipes-core/glibc/glibc-tests.inc | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc-tests.inc b/meta/recipes-core/glibc/glibc-tests.inc new file mode 100644 index 0000000000..a8fe160a54 --- /dev/null +++ b/meta/recipes-core/glibc/glibc-tests.inc @@ -0,0 +1,32 @@ +EXCLUDE_FROM_WORLD = "1" + +# handle PN differences +FILESEXTRAPATHS:prepend := "${THISDIR}/glibc:" + +# setup depends +INHIBIT_DEFAULT_DEPS = "" + +python () { + libc = d.getVar("PREFERRED_PROVIDER_virtual/libc") + libclocale = d.getVar("PREFERRED_PROVIDER_virtual/libc-locale") + if libc != "glibc" or libclocale != "glibc-locale": + raise bb.parse.SkipRecipe("glibc-testsuite requires that virtual/libc is glibc") +} + +DEPENDS += "glibc-locale libgcc gcc-runtime" + +# remove the initial depends +DEPENDS:remove = "libgcc-initial" + +do_check[dirs] += "${B}" +do_check () { + # clean out previous test results + oe_runmake tests-clean + # makefiles don't clean entirely (and also sometimes fails due to too many args) + find ${B} -type f -name "*.out" -delete + find ${B} -type f -name "*.test-result" -delete + find ${B}/catgets -name "*.cat" -delete + find ${B}/conform -name "symlist-*" -delete + [ ! -e ${B}/timezone/testdata ] || rm -rf ${B}/timezone/testdata +} +addtask do_check after do_compile |