From 0be8df3e587e2efef6ad76be0439c4403f007c67 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Sun, 17 Sep 2023 11:38:45 +0200 Subject: glibc-tests: rename to glibc-y2038-tests The recipe originates from meta-y2038 where the name was not confusing, but in oe-core it is. (From OE-Core rev: 90bc7a66b08580207839fc6aafe1ac86c12981c5) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- meta/recipes-core/glibc/glibc-tests_2.38.bb | 119 ---------------------- meta/recipes-core/glibc/glibc-y2038-tests_2.38.bb | 119 ++++++++++++++++++++++ 2 files changed, 119 insertions(+), 119 deletions(-) delete mode 100644 meta/recipes-core/glibc/glibc-tests_2.38.bb create mode 100644 meta/recipes-core/glibc/glibc-y2038-tests_2.38.bb (limited to 'meta/recipes-core') diff --git a/meta/recipes-core/glibc/glibc-tests_2.38.bb b/meta/recipes-core/glibc/glibc-tests_2.38.bb deleted file mode 100644 index 95eb774db7..0000000000 --- a/meta/recipes-core/glibc/glibc-tests_2.38.bb +++ /dev/null @@ -1,119 +0,0 @@ -require glibc_${PV}.bb -require glibc-tests.inc - -inherit ptest features_check -REQUIRED_DISTRO_FEATURES = "ptest" - -SRC_URI += "\ - file://run-ptest \ -" - -SUMMARY = "glibc tests to be run with ptest" - -# Erase some variables already set by glibc_${PV} -python __anonymous() { - # Remove packages provided by glibc build, we only need a subset of them - d.setVar("PACKAGES", "${PN} ${PN}-ptest") - - d.setVar("PROVIDES", "${PN} ${PN}-ptest") - - bbclassextend = d.getVar("BBCLASSEXTEND").replace("nativesdk", "").strip() - d.setVar("BBCLASSEXTEND", bbclassextend) - d.setVar("RRECOMMENDS", "") - d.setVar("SYSTEMD_SERVICE:nscd", "") - d.setVar("SYSTEMD_PACKAGES", "") -} - -# Remove any leftovers from original glibc recipe -RPROVIDES:${PN} = "${PN}" -RRECOMMENDS:${PN} = "" -RDEPENDS:${PN} = "glibc libgcc sed bash" -RDEPENDS:${PN}-ptest = "${PN}" -DEPENDS += "sed" - -export oe_srcdir="${exec_prefix}/src/debug/glibc/${PV}/" - -# Just build tests for target - do not run them -do_check:append () { - oe_runmake -i check run-built-tests=no -} -addtask do_check after do_compile before do_install_ptest_base - -glibc_strip_build_directory () { - # Delete all non executable files from build directory - find ${B} ! -executable -type f -delete - - # Remove build dynamic libraries and links to them as - # those are already installed in the target device - find ${B} -type f -name "*.so" -delete - find ${B} -type l -name "*.so*" -delete - - # Remove headers (installed with glibc) - find ${B} -type f -name "*.h" -delete - - find ${B} -type f -name "isomac" -delete - find ${B} -type f -name "annexc" -delete -} - -do_install_ptest_base () { - glibc_strip_build_directory - - ls -r ${B}/*/*-time64 > ${B}/tst_time64 - - # Remove '-time64' suffix - those tests are also time related - sed -e "s/-time64$//" ${B}/tst_time64 > ${B}/tst_time_tmp - tst_time=$(cat ${B}/tst_time_tmp ${B}/tst_time64) - - rm ${B}/tst_time_tmp ${B}/tst_time64 - echo "${tst_time}" - - # Install build test programs to the image - install -d ${D}${PTEST_PATH}/tests/glibc-ptest/ - - for f in "${tst_time}" - do - cp -r ${f} ${D}${PTEST_PATH}/tests/glibc-ptest/ - done - - install -d ${D}${PTEST_PATH} - cp ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/ - -} - -# The datadir directory is required to allow core (and reused) -# glibc cleanup function to finish correctly, as this directory -# is not created for ptests -stash_locale_package_cleanup:prepend () { - mkdir -p ${PKGD}${datadir} -} - -stash_locale_sysroot_cleanup:prepend () { - mkdir -p ${SYSROOT_DESTDIR}${datadir} -} - -# Prevent the do_package() task to set 'libc6' prefix -# for glibc tests related packages -python populate_packages:prepend () { - if d.getVar('DEBIAN_NAMES'): - d.setVar('DEBIAN_NAMES', '') -} - -FILES:${PN} = "${PTEST_PATH}/* /usr/src/debug/${PN}/*" - -EXCLUDE_FROM_SHLIBS = "1" - -# Install debug data in .debug and sources in /usr/src/debug -# It is more handy to have _all_ the sources and symbols in one -# place (package) as this recipe will be used for validation and -# debugging. -PACKAGE_DEBUG_SPLIT_STYLE = ".debug" - -# glibc test cases violate by default some Yocto/OE checks (staticdev, -# textrel) -# 'debug-files' - add everything (including debug) into one package -# (no need to install/build *-src package) -INSANE_SKIP:${PN} += "staticdev textrel debug-files rpaths" - -deltask do_stash_locale -do_install[noexec] = "1" -do_populate_sysroot[noexec] = "1" diff --git a/meta/recipes-core/glibc/glibc-y2038-tests_2.38.bb b/meta/recipes-core/glibc/glibc-y2038-tests_2.38.bb new file mode 100644 index 0000000000..be49ca4cb7 --- /dev/null +++ b/meta/recipes-core/glibc/glibc-y2038-tests_2.38.bb @@ -0,0 +1,119 @@ +require glibc_${PV}.bb +require glibc-tests.inc + +inherit ptest features_check +REQUIRED_DISTRO_FEATURES = "ptest" + +SRC_URI += "\ + file://run-ptest \ +" + +SUMMARY = "glibc tests using time32/time64 interfaces to be run with ptest for the purpose of checking y2038 compatiblity" + +# Erase some variables already set by glibc_${PV} +python __anonymous() { + # Remove packages provided by glibc build, we only need a subset of them + d.setVar("PACKAGES", "${PN} ${PN}-ptest") + + d.setVar("PROVIDES", "${PN} ${PN}-ptest") + + bbclassextend = d.getVar("BBCLASSEXTEND").replace("nativesdk", "").strip() + d.setVar("BBCLASSEXTEND", bbclassextend) + d.setVar("RRECOMMENDS", "") + d.setVar("SYSTEMD_SERVICE:nscd", "") + d.setVar("SYSTEMD_PACKAGES", "") +} + +# Remove any leftovers from original glibc recipe +RPROVIDES:${PN} = "${PN}" +RRECOMMENDS:${PN} = "" +RDEPENDS:${PN} = "glibc libgcc sed bash" +RDEPENDS:${PN}-ptest = "${PN}" +DEPENDS += "sed" + +export oe_srcdir="${exec_prefix}/src/debug/glibc/${PV}/" + +# Just build tests for target - do not run them +do_check:append () { + oe_runmake -i check run-built-tests=no +} +addtask do_check after do_compile before do_install_ptest_base + +glibc_strip_build_directory () { + # Delete all non executable files from build directory + find ${B} ! -executable -type f -delete + + # Remove build dynamic libraries and links to them as + # those are already installed in the target device + find ${B} -type f -name "*.so" -delete + find ${B} -type l -name "*.so*" -delete + + # Remove headers (installed with glibc) + find ${B} -type f -name "*.h" -delete + + find ${B} -type f -name "isomac" -delete + find ${B} -type f -name "annexc" -delete +} + +do_install_ptest_base () { + glibc_strip_build_directory + + ls -r ${B}/*/*-time64 > ${B}/tst_time64 + + # Remove '-time64' suffix - those tests are also time related + sed -e "s/-time64$//" ${B}/tst_time64 > ${B}/tst_time_tmp + tst_time=$(cat ${B}/tst_time_tmp ${B}/tst_time64) + + rm ${B}/tst_time_tmp ${B}/tst_time64 + echo "${tst_time}" + + # Install build test programs to the image + install -d ${D}${PTEST_PATH}/tests/glibc-ptest/ + + for f in "${tst_time}" + do + cp -r ${f} ${D}${PTEST_PATH}/tests/glibc-ptest/ + done + + install -d ${D}${PTEST_PATH} + cp ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/ + +} + +# The datadir directory is required to allow core (and reused) +# glibc cleanup function to finish correctly, as this directory +# is not created for ptests +stash_locale_package_cleanup:prepend () { + mkdir -p ${PKGD}${datadir} +} + +stash_locale_sysroot_cleanup:prepend () { + mkdir -p ${SYSROOT_DESTDIR}${datadir} +} + +# Prevent the do_package() task to set 'libc6' prefix +# for glibc tests related packages +python populate_packages:prepend () { + if d.getVar('DEBIAN_NAMES'): + d.setVar('DEBIAN_NAMES', '') +} + +FILES:${PN} = "${PTEST_PATH}/* /usr/src/debug/${PN}/*" + +EXCLUDE_FROM_SHLIBS = "1" + +# Install debug data in .debug and sources in /usr/src/debug +# It is more handy to have _all_ the sources and symbols in one +# place (package) as this recipe will be used for validation and +# debugging. +PACKAGE_DEBUG_SPLIT_STYLE = ".debug" + +# glibc test cases violate by default some Yocto/OE checks (staticdev, +# textrel) +# 'debug-files' - add everything (including debug) into one package +# (no need to install/build *-src package) +INSANE_SKIP:${PN} += "staticdev textrel debug-files rpaths" + +deltask do_stash_locale +do_install[noexec] = "1" +do_populate_sysroot[noexec] = "1" -- cgit v1.2.3-54-g00ecf