diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-11-07 13:31:53 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-11-07 13:31:53 +0000 |
| commit | 8c22ff0d8b70d9b12f0487ef696a7e915b9e3173 (patch) | |
| tree | efdc32587159d0050a69009bdf2330a531727d95 /meta/classes-recipe/go-ptest.bbclass | |
| parent | d412d2747595c1cc4a5e3ca975e3adc31b2f7891 (diff) | |
| download | poky-8c22ff0d8b70d9b12f0487ef696a7e915b9e3173.tar.gz | |
The poky repository master branch is no longer being updated.
You can either:
a) switch to individual clones of bitbake, openembedded-core, meta-yocto and yocto-docs
b) use the new bitbake-setup
You can find information about either approach in our documentation:
https://docs.yoctoproject.org/
Note that "poky" the distro setting is still available in meta-yocto as
before and we continue to use and maintain that.
Long live Poky!
Some further information on the background of this change can be found
in: https://lists.openembedded.org/g/openembedded-architecture/message/2179
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe/go-ptest.bbclass')
| -rw-r--r-- | meta/classes-recipe/go-ptest.bbclass | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/meta/classes-recipe/go-ptest.bbclass b/meta/classes-recipe/go-ptest.bbclass deleted file mode 100644 index 54fcbb535d..0000000000 --- a/meta/classes-recipe/go-ptest.bbclass +++ /dev/null | |||
| @@ -1,60 +0,0 @@ | |||
| 1 | # | ||
| 2 | # Copyright OpenEmbedded Contributors | ||
| 3 | # | ||
| 4 | # SPDX-License-Identifier: MIT | ||
| 5 | # | ||
| 6 | |||
| 7 | inherit go ptest | ||
| 8 | |||
| 9 | do_compile_ptest_base() { | ||
| 10 | export TMPDIR="${GOTMPDIR}" | ||
| 11 | rm -f ${B}/.go_compiled_tests.list | ||
| 12 | go_list_package_tests | while read pkg; do | ||
| 13 | cd ${B}/src/$pkg | ||
| 14 | ${GO} test ${GOPTESTBUILDFLAGS} $pkg | ||
| 15 | find . -mindepth 1 -maxdepth 1 -type f -name '*.test' -exec echo $pkg/{} \; | \ | ||
| 16 | sed -e's,/\./,/,'>> ${B}/.go_compiled_tests.list | ||
| 17 | done | ||
| 18 | do_compile_ptest | ||
| 19 | } | ||
| 20 | |||
| 21 | do_compile_ptest_base[dirs] =+ "${GOTMPDIR}" | ||
| 22 | |||
| 23 | go_make_ptest_wrapper() { | ||
| 24 | cat >${D}${PTEST_PATH}/run-ptest <<EOF | ||
| 25 | #!/bin/sh | ||
| 26 | RC=0 | ||
| 27 | run_test() ( | ||
| 28 | cd "\$1" | ||
| 29 | ((((./\$2 ${GOPTESTFLAGS}; echo \$? >&3) | sed -r -e"s,^(PASS|SKIP|FAIL)\$,\\1: \$1/\$2," >&4) 3>&1) | (read rc; exit \$rc)) 4>&1 | ||
| 30 | exit \$?) | ||
| 31 | EOF | ||
| 32 | |||
| 33 | } | ||
| 34 | |||
| 35 | do_install_ptest_base() { | ||
| 36 | test -f "${B}/.go_compiled_tests.list" || exit 0 | ||
| 37 | install -d ${D}${PTEST_PATH} | ||
| 38 | go_stage_testdata | ||
| 39 | go_make_ptest_wrapper | ||
| 40 | havetests="" | ||
| 41 | while read test; do | ||
| 42 | testdir=`dirname $test` | ||
| 43 | testprog=`basename $test` | ||
| 44 | install -d ${D}${PTEST_PATH}/$testdir | ||
| 45 | install -m 0755 ${B}/src/$test ${D}${PTEST_PATH}/$test | ||
| 46 | echo "run_test $testdir $testprog || RC=1" >> ${D}${PTEST_PATH}/run-ptest | ||
| 47 | havetests="yes" | ||
| 48 | done < ${B}/.go_compiled_tests.list | ||
| 49 | if [ -n "$havetests" ]; then | ||
| 50 | echo "exit \$RC" >> ${D}${PTEST_PATH}/run-ptest | ||
| 51 | chmod +x ${D}${PTEST_PATH}/run-ptest | ||
| 52 | else | ||
| 53 | rm -rf ${D}${PTEST_PATH} | ||
| 54 | fi | ||
| 55 | do_install_ptest | ||
| 56 | chown -R root:root ${D}${PTEST_PATH} | ||
| 57 | } | ||
| 58 | |||
| 59 | INSANE_SKIP:${PN}-ptest += "ldflags" | ||
| 60 | |||
