summaryrefslogtreecommitdiff
path: root/meta-arm/meta-arm/recipes-security/trusted-services/ts-psa-api-test-common_git.inc
blob: 8a7b0e5ca2f6925f6d279aee1af875d1b82e500e (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
SUMMARY = "Parts of PSA certification tests (psa-arch-test) for Trusted Services"

TS_ENV = "arm-linux"

require trusted-services.inc

DEPENDS        += "python3-jsonschema-native python3-jinja2-native"

DEPENDS        += "libts"
RDEPENDS:${PN} += "libts"

SRC_URI += "git://github.com/ARM-software/psa-arch-tests.git;name=psatest;protocol=https;branch=main;destsuffix=git/psatest \
            file://0001-Pass-Yocto-build-settings-to-psa-arch-tests-native.patch;patchdir=../psatest \
           "

SRCREV_psatest = "38cb53a4d9e292435ddf7899960b15af62decfbe"
LIC_FILES_CHKSUM += "file://../psatest/LICENSE.md;md5=2a944942e1496af1886903d274dedb13"

EXTRA_OECMAKE += "\
                  -DPSA_ARCH_TESTS_SOURCE_DIR=${WORKDIR}/git/psatest \
                 "

# TS check if there are patches to apply to psa-arch-tests, if so apply them
apply_ts_patch() {
    find ${S}/external/psa_arch_tests -type f -name '*.patch' -exec patch -p1 -d ${WORKDIR}/git/psatest -i {} \;
}
do_patch[postfuncs] += "apply_ts_patch"

FILES:${PN} = "${bindir}/${PSA_TEST}"

do_install:append () {
    install -d ${D}${bindir}
    mv ${D}${TS_INSTALL}/bin/${PSA_TEST} ${D}${bindir}

    rm -r --one-file-system ${D}${TS_INSTALL}
}