All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] glibc: Exclude common code to build tests to glibc-tests.inc
@ 2021-08-23 15:08 ?ukasz Majewski
  2021-08-23 15:08 ` [PATCH 2/2] glibc: ptest: Add support for running glibc test suite with ptest ?ukasz Majewski
  0 siblings, 1 reply; 18+ messages in thread
From: ?ukasz Majewski @ 2021-08-23 15:08 UTC (permalink / raw)
  To: poky, openembedded-core; +Cc: Lukasz Majewski

The common code to build tests has been excluded from glibc-testsuite
recipe to glibc-tests.inc

This code will be reused in the recipe necessary for providing glibc
tests executed with ptest framework.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
 meta/recipes-core/glibc/glibc-tests.inc       | 32 ++++++++++++++++
 .../glibc/glibc-testsuite_2.34.bb             | 37 ++-----------------
 2 files changed, 36 insertions(+), 33 deletions(-)
 create mode 100644 meta/recipes-core/glibc/glibc-tests.inc

diff --git a/meta/recipes-core/glibc/glibc-tests.inc b/meta/recipes-core/glibc/glibc-tests.inc
new file mode 100644
index 0000000000..a8fe160a54
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-tests.inc
@@ -0,0 +1,32 @@
+EXCLUDE_FROM_WORLD = "1"
+
+# handle PN differences
+FILESEXTRAPATHS:prepend := "${THISDIR}/glibc:"
+
+# 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"
+
+do_check[dirs] += "${B}"
+do_check () {
+    # 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
+}
+addtask do_check after do_compile
diff --git a/meta/recipes-core/glibc/glibc-testsuite_2.34.bb b/meta/recipes-core/glibc/glibc-testsuite_2.34.bb
index 72aa332171..e8ad2a938b 100644
--- a/meta/recipes-core/glibc/glibc-testsuite_2.34.bb
+++ b/meta/recipes-core/glibc/glibc-testsuite_2.34.bb
@@ -1,30 +1,12 @@
 require glibc_${PV}.bb
+require glibc-tests.inc
 
-EXCLUDE_FROM_WORLD = "1"
+inherit qemu
 
-# handle PN differences
-FILESEXTRAPATHS:prepend := "${THISDIR}/glibc:"
+SRC_URI += "file://check-test-wrapper"
 
 # 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 ''}"
 
@@ -33,20 +15,10 @@ TOOLCHAIN_TEST_HOST ??= "localhost"
 TOOLCHAIN_TEST_HOST_USER ??= "root"
 TOOLCHAIN_TEST_HOST_PORT ??= "2222"
 
-do_check[dirs] += "${B}"
 do_check[nostamp] = "1"
-do_check () {
+do_check:append () {
     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}" \
@@ -56,7 +28,6 @@ do_check () {
         test-wrapper="${WORKDIR}/check-test-wrapper ${TOOLCHAIN_TEST_TARGET}" \
         check
 }
-addtask do_check after do_compile
 
 inherit nopackages
 deltask do_stash_locale
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-08-27 14:19 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-23 15:08 [PATCH 1/2] glibc: Exclude common code to build tests to glibc-tests.inc ?ukasz Majewski
2021-08-23 15:08 ` [PATCH 2/2] glibc: ptest: Add support for running glibc test suite with ptest ?ukasz Majewski
2021-08-23 16:17   ` [OE-core] " Khem Raj
2021-08-23 18:24     ` ?ukasz Majewski
2021-08-23 19:52       ` Khem Raj
2021-08-23 20:09         ` ?ukasz Majewski
2021-08-23 20:41           ` Khem Raj
2021-08-24  7:36             ` ?ukasz Majewski
2021-08-24  7:41               ` Richard Purdie
2021-08-24  8:42                 ` ?ukasz Majewski
2021-08-26 12:27                   ` ?ukasz Majewski
2021-08-26 13:38                     ` Richard Purdie
2021-08-26 14:12                       ` ?ukasz Majewski
2021-08-26 16:25                         ` Richard Purdie
2021-08-27  7:52                       ` Nathan Rossi
2021-08-27  9:20                         ` ?ukasz Majewski
2021-08-27 11:29                           ` Nathan Rossi
2021-08-27 14:19                             ` ?ukasz Majewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.