[oe-commits] [openembedded-core] 16/66: zlib: clean up ptest

git at git.openembedded.org git at git.openembedded.org
Tue May 21 23:32:39 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch thud
in repository openembedded-core.

commit 9088a78e78f70721b2aa6bdbdf055551d5bd0265
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Tue Mar 26 12:02:27 2019 +0000

    zlib: clean up ptest
    
    Instead of patching and sedding the makefile, just install test/example and
    execute it in run-ptest.  example is the bulk of the test suite, as minimal as
    it is.
    
    Signed-off-by: Ross Burton <ross.burton at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 .../recipes-core/zlib/zlib/Makefile-runtests.patch | 38 ----------------------
 meta/recipes-core/zlib/zlib/run-ptest              |  7 +++-
 meta/recipes-core/zlib/zlib_1.2.11.bb              | 16 +--------
 3 files changed, 7 insertions(+), 54 deletions(-)

diff --git a/meta/recipes-core/zlib/zlib/Makefile-runtests.patch b/meta/recipes-core/zlib/zlib/Makefile-runtests.patch
deleted file mode 100644
index 61eea82..0000000
--- a/meta/recipes-core/zlib/zlib/Makefile-runtests.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Add 'ptest' target to Makefile, to run tests without checking dependencies.
-
-Signed-off-by: Anders Roxell <anders.roxell at enea.com>
-Upstream-Status: Pending
----
-diff -uNr a/Makefile.in b/Makefile.in
---- a/Makefile.in	2013-06-10 13:48:14.321959162 +0200
-+++ b/Makefile.in	2013-06-10 13:49:36.686476448 +0200
-@@ -83,6 +83,9 @@
- test: all teststatic testshared
- 
- teststatic: static
-+	@make runteststatic
-+
-+runteststatic:
- 	@TMPST=tmpst_$$; \
- 	if echo hello world | ./minigzip | ./minigzip -d && ./example $$TMPST ; then \
- 	  echo '		*** zlib test OK ***'; \
-@@ -92,6 +95,9 @@
- 	rm -f $$TMPST
- 
- testshared: shared
-+	@make runtestshared
-+
-+runtestshared:
- 	@LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
- 	LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \
- 	DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \
-@@ -105,6 +111,9 @@
- 	rm -f $$TMPSH
- 
- test64: all64
-+	@make runtestall64
-+
-+runtestall64:
- 	@TMP64=tmp64_$$; \
- 	if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64 $$TMP64; then \
- 	  echo '		*** zlib 64-bit test OK ***'; \
diff --git a/meta/recipes-core/zlib/zlib/run-ptest b/meta/recipes-core/zlib/zlib/run-ptest
index 884d9dc..065863e 100644
--- a/meta/recipes-core/zlib/zlib/run-ptest
+++ b/meta/recipes-core/zlib/zlib/run-ptest
@@ -1,2 +1,7 @@
 #!/bin/sh
-make -k runteststatic runtestshared | sed -r -e 's/^(\s+\*+ (.+?) test OK \*+)/\1\nPASS: \2/' -e 's/^(\s+\*+ (.+?) test FAILED \*+)/\1\nFAIL: \2/'
+
+if ./examplesh ; then
+    echo "PASS: zlib"
+else
+    echo "FAIL: zlib"
+fi
diff --git a/meta/recipes-core/zlib/zlib_1.2.11.bb b/meta/recipes-core/zlib/zlib_1.2.11.bb
index 41ec29d..ef9431a 100644
--- a/meta/recipes-core/zlib/zlib_1.2.11.bb
+++ b/meta/recipes-core/zlib/zlib_1.2.11.bb
@@ -7,7 +7,6 @@ LICENSE = "Zlib"
 LIC_FILES_CHKSUM = "file://zlib.h;beginline=6;endline=23;md5=5377232268e952e9ef63bc555f7aa6c0"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/libpng/${BPN}/${PV}/${BPN}-${PV}.tar.xz \
-           file://Makefile-runtests.patch \
            file://ldflags-tests.patch \
            file://run-ptest \
            "
@@ -30,25 +29,12 @@ do_compile() {
 	oe_runmake shared
 }
 
-do_compile_ptest() {
-	oe_runmake test
-}
-
 do_install() {
 	oe_runmake DESTDIR=${D} install
 }
 
 do_install_ptest() {
-	install ${B}/Makefile   ${D}${PTEST_PATH}
-	install ${B}/example    ${D}${PTEST_PATH}
-	install ${B}/minigzip   ${D}${PTEST_PATH}
-	install ${B}/examplesh  ${D}${PTEST_PATH}
-	install ${B}/minigzipsh ${D}${PTEST_PATH}
-
-	# Remove buildhost references...
-	sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
-		-e 's|${DEBUG_PREFIX_MAP}||g' \
-	 ${D}${PTEST_PATH}/Makefile
+	install ${B}/examplesh ${D}${PTEST_PATH}
 }
 
 # Move zlib shared libraries for target builds to $base_libdir so the library

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list