diff options
| -rw-r--r-- | meta/recipes-core/zlib/zlib-1.2.8/Makefile-runtests.patch | 38 | ||||
| -rw-r--r-- | meta/recipes-core/zlib/zlib-1.2.8/run-ptest | 2 | ||||
| -rw-r--r-- | meta/recipes-core/zlib/zlib_1.2.8.bb | 18 |
3 files changed, 58 insertions, 0 deletions
diff --git a/meta/recipes-core/zlib/zlib-1.2.8/Makefile-runtests.patch b/meta/recipes-core/zlib/zlib-1.2.8/Makefile-runtests.patch new file mode 100644 index 0000000000..61eea8238a --- /dev/null +++ b/meta/recipes-core/zlib/zlib-1.2.8/Makefile-runtests.patch | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | Add 'ptest' target to Makefile, to run tests without checking dependencies. | ||
| 2 | |||
| 3 | Signed-off-by: Anders Roxell <anders.roxell@enea.com> | ||
| 4 | Upstream-Status: Pending | ||
| 5 | --- | ||
| 6 | diff -uNr a/Makefile.in b/Makefile.in | ||
| 7 | --- a/Makefile.in 2013-06-10 13:48:14.321959162 +0200 | ||
| 8 | +++ b/Makefile.in 2013-06-10 13:49:36.686476448 +0200 | ||
| 9 | @@ -83,6 +83,9 @@ | ||
| 10 | test: all teststatic testshared | ||
| 11 | |||
| 12 | teststatic: static | ||
| 13 | + @make runteststatic | ||
| 14 | + | ||
| 15 | +runteststatic: | ||
| 16 | @TMPST=tmpst_$$; \ | ||
| 17 | if echo hello world | ./minigzip | ./minigzip -d && ./example $$TMPST ; then \ | ||
| 18 | echo ' *** zlib test OK ***'; \ | ||
| 19 | @@ -92,6 +95,9 @@ | ||
| 20 | rm -f $$TMPST | ||
| 21 | |||
| 22 | testshared: shared | ||
| 23 | + @make runtestshared | ||
| 24 | + | ||
| 25 | +runtestshared: | ||
| 26 | @LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ | ||
| 27 | LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \ | ||
| 28 | DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \ | ||
| 29 | @@ -105,6 +111,9 @@ | ||
| 30 | rm -f $$TMPSH | ||
| 31 | |||
| 32 | test64: all64 | ||
| 33 | + @make runtestall64 | ||
| 34 | + | ||
| 35 | +runtestall64: | ||
| 36 | @TMP64=tmp64_$$; \ | ||
| 37 | if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64 $$TMP64; then \ | ||
| 38 | echo ' *** zlib 64-bit test OK ***'; \ | ||
diff --git a/meta/recipes-core/zlib/zlib-1.2.8/run-ptest b/meta/recipes-core/zlib/zlib-1.2.8/run-ptest new file mode 100644 index 0000000000..884d9dc699 --- /dev/null +++ b/meta/recipes-core/zlib/zlib-1.2.8/run-ptest | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | make -k runteststatic runtestshared | sed -r -e 's/^(\s+\*+ (.+?) test OK \*+)/\1\nPASS: \2/' -e 's/^(\s+\*+ (.+?) test FAILED \*+)/\1\nFAIL: \2/' | ||
diff --git a/meta/recipes-core/zlib/zlib_1.2.8.bb b/meta/recipes-core/zlib/zlib_1.2.8.bb index 5cdf68584b..bdfa045b7b 100644 --- a/meta/recipes-core/zlib/zlib_1.2.8.bb +++ b/meta/recipes-core/zlib/zlib_1.2.8.bb | |||
| @@ -9,11 +9,17 @@ LIC_FILES_CHKSUM = "file://zlib.h;beginline=4;endline=23;md5=fde612df1e5933c428b | |||
| 9 | 9 | ||
| 10 | SRC_URI = "http://www.zlib.net/${BPN}-${PV}.tar.xz \ | 10 | SRC_URI = "http://www.zlib.net/${BPN}-${PV}.tar.xz \ |
| 11 | file://remove.ldconfig.call.patch \ | 11 | file://remove.ldconfig.call.patch \ |
| 12 | file://Makefile-runtests.patch \ | ||
| 13 | file://run-ptest \ | ||
| 12 | " | 14 | " |
| 13 | 15 | ||
| 14 | SRC_URI[md5sum] = "28f1205d8dd2001f26fec1e8c2cebe37" | 16 | SRC_URI[md5sum] = "28f1205d8dd2001f26fec1e8c2cebe37" |
| 15 | SRC_URI[sha256sum] = "831df043236df8e9a7667b9e3bb37e1fcb1220a0f163b6de2626774b9590d057" | 17 | SRC_URI[sha256sum] = "831df043236df8e9a7667b9e3bb37e1fcb1220a0f163b6de2626774b9590d057" |
| 16 | 18 | ||
| 19 | RDEPENDS_${PN}-ptest += "make" | ||
| 20 | |||
| 21 | inherit ptest | ||
| 22 | |||
| 17 | do_configure (){ | 23 | do_configure (){ |
| 18 | ./configure --prefix=${prefix} --shared --libdir=${libdir} | 24 | ./configure --prefix=${prefix} --shared --libdir=${libdir} |
| 19 | } | 25 | } |
| @@ -22,10 +28,22 @@ do_compile (){ | |||
| 22 | oe_runmake | 28 | oe_runmake |
| 23 | } | 29 | } |
| 24 | 30 | ||
| 31 | do_compile_ptest() { | ||
| 32 | oe_runmake static shared | ||
| 33 | } | ||
| 34 | |||
| 25 | do_install() { | 35 | do_install() { |
| 26 | oe_runmake DESTDIR=${D} install | 36 | oe_runmake DESTDIR=${D} install |
| 27 | } | 37 | } |
| 28 | 38 | ||
| 39 | do_install_ptest() { | ||
| 40 | install ${B}/Makefile ${D}${PTEST_PATH} | ||
| 41 | install ${B}/example ${D}${PTEST_PATH} | ||
| 42 | install ${B}/minigzip ${D}${PTEST_PATH} | ||
| 43 | install ${B}/examplesh ${D}${PTEST_PATH} | ||
| 44 | install ${B}/minigzipsh ${D}${PTEST_PATH} | ||
| 45 | } | ||
| 46 | |||
| 29 | # We move zlib shared libraries for target builds to avoid | 47 | # We move zlib shared libraries for target builds to avoid |
| 30 | # qa warnings. | 48 | # qa warnings. |
| 31 | # | 49 | # |
