summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc-testsuite_2.33.bb
blob: 72aa332171d4db19de7c3864c9baff968e457221 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
require glibc_${PV}.bb

EXCLUDE_FROM_WORLD = "1"

# handle PN differences
FILESEXTRAPATHS:prepend := "${THISDIR}/glibc:"

# strip provides
PROVIDES = ""
# 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"

inherit qemu

SRC_URI += "file://check-test-wrapper"

DEPENDS += "${@'qemu-native' if d.getVar('TOOLCHAIN_TEST_TARGET') == 'user' else ''}"

TOOLCHAIN_TEST_TARGET ??= "user"
TOOLCHAIN_TEST_HOST ??= "localhost"
TOOLCHAIN_TEST_HOST_USER ??= "root"
TOOLCHAIN_TEST_HOST_PORT ??= "2222"

do_check[dirs] += "${B}"
do_check[nostamp] = "1"
do_check () {
    chmod 0755 ${WORKDIR}/check-test-wrapper

    # 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

    oe_runmake -i \
        QEMU_SYSROOT="${RECIPE_SYSROOT}" \
        QEMU_OPTIONS="${@qemu_target_binary(d)} ${QEMU_OPTIONS}" \
        SSH_HOST="${TOOLCHAIN_TEST_HOST}" \
        SSH_HOST_USER="${TOOLCHAIN_TEST_HOST_USER}" \
        SSH_HOST_PORT="${TOOLCHAIN_TEST_HOST_PORT}" \
        test-wrapper="${WORKDIR}/check-test-wrapper ${TOOLCHAIN_TEST_TARGET}" \
        check
}
addtask do_check after do_compile

inherit nopackages
deltask do_stash_locale
deltask do_install
deltask do_populate_sysroot