Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 1 | SUMMARY = "OP-TEE sanity testsuite" |
| 2 | DESCRIPTION = "Open Portable Trusted Execution Environment - Test suite" |
| 3 | HOMEPAGE = "https://www.op-tee.org/" |
| 4 | |
| 5 | LICENSE = "BSD-2-Clause & GPL-2.0-only" |
| 6 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa" |
| 7 | |
| 8 | inherit python3native ptest |
| 9 | require optee.inc |
| 10 | |
| 11 | DEPENDS = "optee-client optee-os-tadevkit python3-cryptography-native" |
| 12 | |
| 13 | SRC_URI = "git://github.com/OP-TEE/optee_test.git;branch=master;protocol=https \ |
| 14 | file://run-ptest \ |
| 15 | " |
| 16 | |
| 17 | S = "${WORKDIR}/git" |
| 18 | B = "${WORKDIR}/build" |
| 19 | |
| 20 | EXTRA_OEMAKE += "TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \ |
| 21 | CROSS_COMPILE_HOST=${HOST_PREFIX} \ |
| 22 | CROSS_COMPILE_TA=${HOST_PREFIX} \ |
| 23 | O=${B} \ |
| 24 | " |
| 25 | |
| 26 | do_compile() { |
| 27 | cd ${S} |
| 28 | # Top level makefile doesn't seem to handle parallel make gracefully |
| 29 | oe_runmake xtest |
| 30 | oe_runmake ta |
| 31 | oe_runmake test_plugin |
| 32 | } |
| 33 | do_compile[cleandirs] = "${B}" |
| 34 | |
| 35 | do_install () { |
| 36 | install -D -p -m0755 ${B}/xtest/xtest ${D}${bindir}/xtest |
| 37 | |
| 38 | # install path should match the value set in optee-client/tee-supplicant |
| 39 | # default TEEC_LOAD_PATH is /lib |
| 40 | mkdir -p ${D}${nonarch_base_libdir}/optee_armtz/ |
| 41 | install -D -p -m0444 ${B}/ta/*/*.ta ${D}${nonarch_base_libdir}/optee_armtz/ |
| 42 | mkdir -p ${D}${libdir}/tee-supplicant/plugins |
| 43 | install -D -p -m0444 ${B}/supp_plugin/*.plugin ${D}${libdir}/tee-supplicant/plugins/ |
| 44 | } |
| 45 | |
| 46 | FILES:${PN} += "${nonarch_base_libdir}/optee_armtz/ \ |
| 47 | ${libdir}/tee-supplicant/plugins/ \ |
| 48 | " |
| 49 | |
| 50 | # Imports machine specific configs from staging to build |
| 51 | PACKAGE_ARCH = "${MACHINE_ARCH}" |