blob: 657fd4dbc1b176e0bd41c150ab731957b2b34fb0 [file] [log] [blame]
Brad Bishop79641f22019-09-10 07:20:22 -04001require glibc_${PV}.bb
2
3# handle PN differences
4FILESEXTRAPATHS_prepend := "${THISDIR}/glibc:"
5
6# strip provides
7PROVIDES = ""
8# setup depends
9INHIBIT_DEFAULT_DEPS = ""
10
Brad Bishopa34c0302019-09-23 22:34:48 -040011python () {
12 libc = d.getVar("PREFERRED_PROVIDER_virtual/libc")
13 libclocale = d.getVar("PREFERRED_PROVIDER_virtual/libc-locale")
14 if libc != "glibc" or libclocale != "glibc-locale":
15 raise bb.parse.SkipRecipe("glibc-testsuite requires that virtual/libc is glibc")
16}
17
Brad Bishop79641f22019-09-10 07:20:22 -040018DEPENDS += "glibc-locale libgcc gcc-runtime"
19
20# remove the initial depends
21DEPENDS_remove = "libgcc-initial"
22
23inherit qemu
24
25SRC_URI += "file://check-test-wrapper"
26
27DEPENDS += "${@'qemu-native' if d.getVar('TOOLCHAIN_TEST_TARGET') == 'user' else ''}"
28
29TOOLCHAIN_TEST_TARGET ??= "user"
30TOOLCHAIN_TEST_HOST ??= "localhost"
31TOOLCHAIN_TEST_HOST_USER ??= "root"
32TOOLCHAIN_TEST_HOST_PORT ??= "2222"
33
34do_check[dirs] += "${B}"
35do_check[nostamp] = "1"
36do_check () {
37 chmod 0755 ${WORKDIR}/check-test-wrapper
38
39 # clean out previous test results
40 oe_runmake tests-clean
41 # makefiles don't clean entirely (and also sometimes fails due to too many args)
42 find ${B} -type f -name "*.out" -delete
43 find ${B} -type f -name "*.test-result" -delete
44 find ${B}/catgets -name "*.cat" -delete
45 find ${B}/conform -name "symlist-*" -delete
46 [ ! -e ${B}/timezone/testdata ] || rm -rf ${B}/timezone/testdata
47
48 oe_runmake -i \
49 QEMU_SYSROOT="${RECIPE_SYSROOT}" \
50 QEMU_OPTIONS="${@qemu_target_binary(d)} ${QEMU_OPTIONS}" \
51 SSH_HOST="${TOOLCHAIN_TEST_HOST}" \
52 SSH_HOST_USER="${TOOLCHAIN_TEST_HOST_USER}" \
53 SSH_HOST_PORT="${TOOLCHAIN_TEST_HOST_PORT}" \
54 test-wrapper="${WORKDIR}/check-test-wrapper ${TOOLCHAIN_TEST_TARGET}" \
55 check
56}
57addtask do_check after do_compile
58
59inherit nopackages
60deltask do_stash_locale