summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/bzip2
diff options
context:
space:
mode:
authorRahul Kumar <rahulk@mvista.com>2020-06-25 18:41:27 +0530
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-08 10:37:12 +0100
commit90e8954c0d4a715b6b24e1674b74dcab1315a835 (patch)
tree8dcfae7a0d9b51d321c049a2dc19f2742669dd31 /meta/recipes-extended/bzip2
parentd5b3335c59101d3fd32d1b8b9529334b3c38d92e (diff)
downloadpoky-90e8954c0d4a715b6b24e1674b74dcab1315a835.tar.gz
bzip2: Add test suite for bzip2
Source: git://sourceware.org/git/bzip2-tests.git Type: Enhancement Description: bzip2 now has a test suite available at git://sourceware.org/git/bzip2-tests.git. This is a collection of "interesting" .bz2 files that can be used to test bzip2 works correctly. They come from different projects. Some files are deliberately bad, and are use to see how bzip2 handles corrupt files. They are explicitly not intended to decompress correctly, but to catch errors in bzip2 trying to deal with deliberately bad data. All such files have a name ending in .bz2.bad. All non-bad files end in bz2. And should come with a .md5 file for the original input file. The .md5 file is used to check that bzip2 could correctly decompress the file. The original (non-compressed) files are deliberately not checked in. It will by default test with the command 'bzip2', running under valgrind (if installed on the system). For each .bz2 file found it is decompressed, recompressed and decompressed again. Once with the default bzip2 settings and once in --small (-s) mode. For each .bz2.bad file decompression is tried twice also. In default mode and small mode. The bzip2 binary is expected to return either 1 or 2 as exit status. Any other exit code is interpreted as failure. License: In bzip2-tests source code Each directory should contain a README file explaining where the .bz2 files originally came from. Plus a reference to the (Free Software) license that the project files were distributed under. Test Summery: On qemux86-64/kvm the ptest results with extra filesystem space (atleast 114688) are: TOTAL: 396 PASS: 396 SKIP: 0 XFAIL: 0 FAIL: 0 XPASS: 0 ERROR: 0 All tests passed DURATION: 517 [YOCTO #13444] (From OE-Core rev: 968529b484265b577e8b8130caef448a8a9d8b68) Signed-off-by: Rahul Kumar <rahulk@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/bzip2')
-rw-r--r--meta/recipes-extended/bzip2/bzip2/Makefile.am1
-rw-r--r--meta/recipes-extended/bzip2/bzip2_1.0.8.bb31
2 files changed, 29 insertions, 3 deletions
diff --git a/meta/recipes-extended/bzip2/bzip2/Makefile.am b/meta/recipes-extended/bzip2/bzip2/Makefile.am
index dcf64584d9..d4498947e8 100644
--- a/meta/recipes-extended/bzip2/bzip2/Makefile.am
+++ b/meta/recipes-extended/bzip2/bzip2/Makefile.am
@@ -46,6 +46,7 @@ runtest:
46 else echo "FAIL: sample2 decompress"; fi 46 else echo "FAIL: sample2 decompress"; fi
47 @if cmp sample3.tst sample3.ref; then echo "PASS: sample3 decompress";\ 47 @if cmp sample3.tst sample3.ref; then echo "PASS: sample3 decompress";\
48 else echo "FAIL: sample3 decompress"; fi 48 else echo "FAIL: sample3 decompress"; fi
49 ./bzip2-tests/run-tests.sh --tests-dir="$(PWD)/bzip2-tests"
49 50
50install-ptest: 51install-ptest:
51 sed -n '/^runtest:/,/^install-ptest:/{/^install-ptest:/!p}' \ 52 sed -n '/^runtest:/,/^install-ptest:/{/^install-ptest:/!p}' \
diff --git a/meta/recipes-extended/bzip2/bzip2_1.0.8.bb b/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
index d58f553a49..70eb67f1f2 100644
--- a/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
+++ b/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
@@ -4,10 +4,25 @@ Huffman coding. Compression is generally considerably better than that achieved
4LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors." 4LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors."
5HOMEPAGE = "https://sourceware.org/bzip2/" 5HOMEPAGE = "https://sourceware.org/bzip2/"
6SECTION = "console/utils" 6SECTION = "console/utils"
7LICENSE = "bzip2-1.0.6" 7LICENSE = "bzip2-1.0.6 & GPLv3+ & Apache-2.0 & MS-PL & BSD-3-Clause & Zlib"
8LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664" 8LICENSE_${PN} = "bzip2-1.0.6"
9LICENSE_${PN}-dev = "bzip2-1.0.6"
10LICENSE_${PN}-dbg = "bzip2-1.0.6"
11LICENSE_${PN}-doc = "bzip2-1.0.6"
12LICENSE_${PN}-src = "bzip2-1.0.6"
13LICENSE_libbz2 = "bzip2-1.0.6"
14LICENSE_${PN}-ptest = "bzip2-1.0.6 & GPLv3+ & Apache-2.0 & MS-PL & BSD-3-Clause & Zlib"
15
16LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664 \
17 file://${WORKDIR}/git/commons-compress/LICENSE.txt;md5=86d3f3a95c324c9479bd8986968f4327 \
18 file://${WORKDIR}/git/dotnetzip/License.txt;md5=9cb56871eed4e748c3bc7e8ff352a54f \
19 file://${WORKDIR}/git/dotnetzip/License.zlib.txt;md5=cc421ccd22eeb2e5db6b79e6de0a029f \
20 file://${WORKDIR}/git/go/LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707 \
21 file://${WORKDIR}/git/lbzip2/COPYING;md5=d32239bcb673463ab874e80d47fae504 \
22"
9 23
10SRC_URI = "https://sourceware.org/pub/${BPN}/${BPN}-${PV}.tar.gz \ 24SRC_URI = "https://sourceware.org/pub/${BPN}/${BPN}-${PV}.tar.gz \
25 git://sourceware.org/git/bzip2-tests.git;name=bzip2-tests \
11 file://configure.ac;subdir=${BP} \ 26 file://configure.ac;subdir=${BP} \
12 file://Makefile.am;subdir=${BP} \ 27 file://Makefile.am;subdir=${BP} \
13 file://run-ptest \ 28 file://run-ptest \
@@ -15,6 +30,8 @@ SRC_URI = "https://sourceware.org/pub/${BPN}/${BPN}-${PV}.tar.gz \
15SRC_URI[md5sum] = "67e051268d0c475ea773822f7500d0e5" 30SRC_URI[md5sum] = "67e051268d0c475ea773822f7500d0e5"
16SRC_URI[sha256sum] = "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269" 31SRC_URI[sha256sum] = "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269"
17 32
33SRCREV_bzip2-tests = "f9061c030a25de5b6829e1abf373057309c734c0"
34
18UPSTREAM_CHECK_URI = "https://www.sourceware.org/pub/bzip2/" 35UPSTREAM_CHECK_URI = "https://www.sourceware.org/pub/bzip2/"
19 36
20PACKAGES =+ "libbz2" 37PACKAGES =+ "libbz2"
@@ -34,12 +51,20 @@ do_configure_prepend () {
34} 51}
35 52
36do_install_ptest () { 53do_install_ptest () {
54 install -d ${D}${PTEST_PATH}/bzip2-tests
55 cp -r ${WORKDIR}/git/commons-compress ${D}${PTEST_PATH}/bzip2-tests/commons-compress
56 cp -r ${WORKDIR}/git/dotnetzip ${D}${PTEST_PATH}/bzip2-tests/dotnetzip
57 cp -r ${WORKDIR}/git/go ${D}${PTEST_PATH}/bzip2-tests/go
58 cp -r ${WORKDIR}/git/lbzip2 ${D}${PTEST_PATH}/bzip2-tests/lbzip2
59 cp -r ${WORKDIR}/git/pyflate ${D}${PTEST_PATH}/bzip2-tests/pyflate
60 cp ${WORKDIR}/git/README ${D}${PTEST_PATH}/bzip2-tests/
61 cp ${WORKDIR}/git/run-tests.sh ${D}${PTEST_PATH}/bzip2-tests/
37 sed -i -e "s|^Makefile:|_Makefile:|" ${D}${PTEST_PATH}/Makefile 62 sed -i -e "s|^Makefile:|_Makefile:|" ${D}${PTEST_PATH}/Makefile
38} 63}
39 64
40FILES_libbz2 = "${libdir}/lib*${SOLIBS}" 65FILES_libbz2 = "${libdir}/lib*${SOLIBS}"
41 66
42RDEPENDS_${PN}-ptest += "make" 67RDEPENDS_${PN}-ptest += "make bash"
43 68
44PROVIDES_append_class-native = " bzip2-replacement-native" 69PROVIDES_append_class-native = " bzip2-replacement-native"
45BBCLASSEXTEND = "native nativesdk" 70BBCLASSEXTEND = "native nativesdk"