summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc-testsuite_2.30.bb
diff options
context:
space:
mode:
authorNathan Rossi <nathan@nathanrossi.com>2019-09-03 16:56:41 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-06 12:45:47 +0100
commit182267b3052de9539bd0a72ffdfc41e54ed3b298 (patch)
tree1c8ae95d36d29bd66a459906317e7ac259b051d1 /meta/recipes-core/glibc/glibc-testsuite_2.30.bb
parent6ccf0746cf91bf9e792e9dfe41389eeb286db803 (diff)
downloadpoky-182267b3052de9539bd0a72ffdfc41e54ed3b298.tar.gz
glibc-testsuite: Create a recipe to implement glibc test suite
A recipe needs to be created for the test suite due to the dependency chain between libgcc -> glibc -> libgcc-initial, and the requirements of the test suite to have libgcc for compilation and execution. The glibc test suite does not use dejagnu like the gcc test suites do. Instead a test wrapper script is used along with the assumed dependency of having the same filesystem available on build host and target. For qemu linux-user the same filesystem is inherently available, for remote targets NFS is used. Separate test wrapper scripts are created for qemu linux-user or ssh targets, with the same TOOLCHAIN_TEST_* variables used for configuration. (From OE-Core rev: 6c4d581c35ebd51c4b080ac38175d93f0480f97d) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glibc/glibc-testsuite_2.30.bb')
-rw-r--r--meta/recipes-core/glibc/glibc-testsuite_2.30.bb51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc-testsuite_2.30.bb b/meta/recipes-core/glibc/glibc-testsuite_2.30.bb
new file mode 100644
index 0000000000..88764d9e2b
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-testsuite_2.30.bb
@@ -0,0 +1,51 @@
1require glibc_${PV}.bb
2
3# handle PN differences
4FILESEXTRAPATHS_prepend := "${THISDIR}/glibc:"
5
6# strip provides
7PROVIDES = ""
8# setup depends
9INHIBIT_DEFAULT_DEPS = ""
10
11DEPENDS += "glibc-locale libgcc gcc-runtime"
12
13# remove the initial depends
14DEPENDS_remove = "libgcc-initial"
15
16inherit qemu
17
18SRC_URI += "file://check-test-wrapper"
19
20DEPENDS += "${@'qemu-native' if d.getVar('TOOLCHAIN_TEST_TARGET') == 'user' else ''}"
21
22TOOLCHAIN_TEST_TARGET ??= "user"
23TOOLCHAIN_TEST_HOST ??= "localhost"
24TOOLCHAIN_TEST_HOST_USER ??= "root"
25TOOLCHAIN_TEST_HOST_PORT ??= "2222"
26
27do_check[dirs] += "${B}"
28do_check[nostamp] = "1"
29do_check () {
30 chmod 0755 ${WORKDIR}/check-test-wrapper
31
32 # clean out previous test results
33 oe_runmake tests-clean
34 # makefiles don't clean entirely (and also sometimes fails due to too many args)
35 find ${B} -type f -name "*.out" -delete
36 find ${B} -type f -name "*.test-result" -delete
37 find ${B}/catgets -name "*.cat" -delete
38 find ${B}/conform -name "symlist-*" -delete
39 [ ! -e ${B}/timezone/testdata ] || rm -rf ${B}/timezone/testdata
40
41 oe_runmake -i \
42 QEMU_SYSROOT="${RECIPE_SYSROOT}" \
43 QEMU_OPTIONS="${@qemu_target_binary(d)} ${QEMU_OPTIONS}" \
44 SSH_HOST="${TOOLCHAIN_TEST_HOST}" \
45 SSH_HOST_USER="${TOOLCHAIN_TEST_HOST_USER}" \
46 SSH_HOST_PORT="${TOOLCHAIN_TEST_HOST_PORT}" \
47 test-wrapper="${WORKDIR}/check-test-wrapper ${TOOLCHAIN_TEST_TARGET}" \
48 check
49}
50addtask do_check after do_compile
51