diff options
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-test')
-rw-r--r-- | meta-openembedded/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb | 39 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-test/cmocka/files/cmocka-uintptr_t.patch | 53 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-test/cmocka/files/run-ptest | 10 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-test/cukinia/cukinia_0.5.1.bb | 19 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-test/cunit/cunit_2.1-3.bb | 18 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-test/cunit/files/run-ptest | 19 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-test/fwts/fwts/0001-Remove-Werror-from-build.patch | 16 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-test/fwts/fwts_20.07.00.bb (renamed from meta-openembedded/meta-oe/recipes-test/fwts/fwts_19.06.00.bb) | 10 |
8 files changed, 164 insertions, 20 deletions
diff --git a/meta-openembedded/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb b/meta-openembedded/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb new file mode 100644 index 000000000..5aee5ef93 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb @@ -0,0 +1,39 @@ +DESCRIPTION = "cmocka is an elegant unit testing framework for C with support for mock \ +objects. It only requires the standard C library, works on a range of computing \ +platforms (including embedded) and with different compilers." +HOMEPAGE = "https://cmocka.org/" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRCREV = "56eb3a183fc222120f86d0c54fd033992c30135e" +SRC_URI = "git://git.cryptomilk.org/projects/cmocka.git \ + file://run-ptest \ + file://cmocka-uintptr_t.patch \ + " + +S = "${WORKDIR}/git" + +inherit cmake ptest + +EXTRA_OECMAKE = "${@bb.utils.contains('PTEST_ENABLED', '1', '-DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=ON', '', d)}" + +do_install_append () { + install -d ${D}${datadir}/${BPN}/example + install -d ${D}${datadir}/${BPN}/example/mock/chef_wrap + install -d ${D}${datadir}/${BPN}/example/mock/uptime + + install -m 0755 ${B}/example/*_test ${D}/${datadir}/${BPN}/example + install -m 0755 ${B}/example/mock/chef_wrap/waiter_test_wrap ${D}/${datadir}/${BPN}/example/mock/chef_wrap + install -m 0755 ${B}/example/mock/uptime/uptime ${D}/${datadir}/${BPN}/example/mock/uptime + install -m 0755 ${B}/example/mock/uptime/test_uptime ${D}/${datadir}/${BPN}/example/mock/uptime +} + +do_install_ptest () { + install -d ${D}${PTEST_PATH}/tests + install -m 0755 ${B}/tests/test_* ${D}${PTEST_PATH}/tests +} + +PACKAGE_BEFORE_PN += "${PN}-examples" + +FILES_${PN}-examples = "${datadir}/${BPN}/example" diff --git a/meta-openembedded/meta-oe/recipes-test/cmocka/files/cmocka-uintptr_t.patch b/meta-openembedded/meta-oe/recipes-test/cmocka/files/cmocka-uintptr_t.patch new file mode 100644 index 000000000..8d3b73b63 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/cmocka/files/cmocka-uintptr_t.patch @@ -0,0 +1,53 @@ +From 5bd7b5d04435bd593349825973ce32290f5f604d Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Wed, 25 Jul 2018 09:55:25 +0800 +Subject: [PATCH] samba: cmocka.h: fix musl libc conflicting types error + +Fix build on qemumips64(el) + +taken from: +[PATCH] libldb: fix musl libc conflicting types error + +/third_party/cmocka/cmocka.h:126:28: error: conflicting types for 'uintptr_t' + typedef unsigned int uintptr_t; + ^~~~~~~~~ +use __DEFINED_uintptr_t in alltypes.h to check if uintptr already defined + +Upstream-Status: Pending + +Signed-off-by: Changqing Li <changqing.li@windriver.com> +Signed-off-by: Andrea Adami <andrea.adami@gmail.com> + +Taken from [PATCH] samba: cmocka.h: fix musl libc conflicting types error +https://git.openembedded.org/meta-openembedded/commit/meta-networking/recipes-connectivity/samba?id=b758150d30a5fbdc47c465d0e9dca3a7e6d71f3c + +Signed-off-by: Armin Kuster <akuster808@gmail.com> + +This fix is not in cmocka, so pending pending?? + + +Index: git/include/cmocka.h +=================================================================== +--- git.orig/include/cmocka.h ++++ git/include/cmocka.h +@@ -116,7 +116,7 @@ typedef uintmax_t LargestIntegralType; + ((LargestIntegralType)(value)) + + /* Smallest integral type capable of holding a pointer. */ +-#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED) ++#if !defined(__DEFINED_uintptr_t) + # if defined(_WIN32) + /* WIN32 is an ILP32 platform */ + typedef unsigned int uintptr_t; +@@ -140,9 +140,8 @@ typedef uintmax_t LargestIntegralType; + # endif /* __WORDSIZE */ + # endif /* _WIN32 */ + +-# define _UINTPTR_T +-# define _UINTPTR_T_DEFINED +-#endif /* !defined(_UINTPTR_T) || !defined(_UINTPTR_T_DEFINED) */ ++# define __DEFINED_uintptr_t ++#endif /* !defined(__DEFINED_uintptr_t) */ + + /* Perform an unsigned cast to uintptr_t. */ + #define cast_to_pointer_integral_type(value) \ diff --git a/meta-openembedded/meta-oe/recipes-test/cmocka/files/run-ptest b/meta-openembedded/meta-oe/recipes-test/cmocka/files/run-ptest new file mode 100644 index 000000000..48b9cd9fc --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/cmocka/files/run-ptest @@ -0,0 +1,10 @@ +#!/bin/sh + +cd tests +for i in `ls *`; do + if [ ./$i ] ; then + echo "PASS: $i" + else + echo "FAIL: $i" + fi +done diff --git a/meta-openembedded/meta-oe/recipes-test/cukinia/cukinia_0.5.1.bb b/meta-openembedded/meta-oe/recipes-test/cukinia/cukinia_0.5.1.bb new file mode 100644 index 000000000..34dd8c868 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/cukinia/cukinia_0.5.1.bb @@ -0,0 +1,19 @@ +SUMMARY = "Linux firmware validation framework" +DESCRIPTION = "Cukinia is designed to help Linux-based embedded firmware \ +developers run simple system-level validation tests on their firmware." +HOMEPAGE = "https://github.com/savoirfairelinux/cukinia" +LICENSE = "GPLv3 & Apache-2.0" + +LIC_FILES_CHKSUM = "file://LICENSE.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ + file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" + +SRC_URI = "git://github.com/savoirfairelinux/cukinia.git;protocol=https;branch=master" + +SRCREV = "ea934c5393ad99c37bec3c621a364122720cce02" + +S = "${WORKDIR}/git" + +do_install () { + install -d ${D}${sbindir} + install -m 0755 ${S}/cukinia ${D}${sbindir} +} diff --git a/meta-openembedded/meta-oe/recipes-test/cunit/cunit_2.1-3.bb b/meta-openembedded/meta-oe/recipes-test/cunit/cunit_2.1-3.bb index babf8048a..c877d3bf1 100644 --- a/meta-openembedded/meta-oe/recipes-test/cunit/cunit_2.1-3.bb +++ b/meta-openembedded/meta-oe/recipes-test/cunit/cunit_2.1-3.bb @@ -7,16 +7,30 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=7734aa853b85d6f935466f081490ddbb" S = "${WORKDIR}/CUnit-${PV}" SRC_URI = "${SOURCEFORGE_MIRROR}/project/cunit/CUnit/${PV}/CUnit-${PV}.tar.bz2 \ - file://fixup-install-docdir.patch" + file://fixup-install-docdir.patch \ + file://run-ptest \ + " SRC_URI[md5sum] = "b5f1a9f6093869c070c6e4a9450cc10c" SRC_URI[sha256sum] = "f5b29137f845bb08b77ec60584fdb728b4e58f1023e6f249a464efa49a40f214" UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/cunit/files/releases" -inherit autotools-brokensep remove-libtool +inherit autotools-brokensep remove-libtool ptest EXTRA_OECONF = "--enable-memtrace --enable-automated --enable-basic --enable-console" +TESTBIN = "/CUnit/Sources/Test/test_cunit" + +PACKAGECONFIG ?= "${@bb.utils.contains('PTEST_ENABLED', '1', 'test','', d)} \ + " + +PACKAGECONFIG[test] = "--enable-test,,," + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + install -m 0755 ${S}${TESTBIN} ${D}${PTEST_PATH}/tests/ +} + FILES_${PN}-dev += "${datadir}/CUnit" FILES_${PN}-doc += "${docdir}" diff --git a/meta-openembedded/meta-oe/recipes-test/cunit/files/run-ptest b/meta-openembedded/meta-oe/recipes-test/cunit/files/run-ptest new file mode 100644 index 000000000..903c8c8d9 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/cunit/files/run-ptest @@ -0,0 +1,19 @@ +#!/bin/sh + +ptestdir=$(dirname "$(readlink -f "$0")") +cd $ptestdir/tests +./test_cunit > cunit_test_out.tmp + +echo "--- Test output ---" +cat cunit_test_out.tmp +echo "" +echo "--- ptest result ---" + +grep "Failures: 0" cunit_test_out.tmp > /dev/null +if [ $? -eq 0 ]; then + echo "PASS: cunit" +else + echo "FAIL: cunit" +fi + +rm -f cunit_test_out.tmp diff --git a/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0001-Remove-Werror-from-build.patch b/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0001-Remove-Werror-from-build.patch index 6795ba849..93a42213b 100644 --- a/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0001-Remove-Werror-from-build.patch +++ b/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0001-Remove-Werror-from-build.patch @@ -11,8 +11,6 @@ Upstream-Status: Pending src/utilities/Makefile.am | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) -diff --git a/src/Makefile.am b/src/Makefile.am -index 62c9ba8..435ec23 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,7 +14,7 @@ AM_CPPFLAGS = \ @@ -20,15 +18,13 @@ index 62c9ba8..435ec23 100644 `pkg-config --silence-errors --cflags json-c` \ -pthread `pkg-config --cflags glib-2.0 gio-2.0` \ - -Wall -Werror -Wextra \ -+ -Wall -Wextra \ - -Wno-address-of-packed-member - - bin_PROGRAMS = fwts -diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am -index 6bcf9f8..de89bf1 100644 ++ -Wall -Wextra \ + -Wno-address-of-packed-member \ + -Wfloat-equal -Wmissing-declarations \ + -Wno-long-long -Wredundant-decls -Wshadow \ --- a/src/lib/src/Makefile.am +++ b/src/lib/src/Makefile.am -@@ -24,7 +24,7 @@ AM_CPPFLAGS = \ +@@ -25,7 +25,7 @@ AM_CPPFLAGS = \ `pkg-config --silence-errors --cflags json-c` \ `pkg-config --cflags glib-2.0 gio-2.0` \ -DDATAROOTDIR=\"$(datarootdir)\" \ @@ -37,8 +33,6 @@ index 6bcf9f8..de89bf1 100644 -Wno-address-of-packed-member pkglib_LTLIBRARIES = libfwts.la -diff --git a/src/utilities/Makefile.am b/src/utilities/Makefile.am -index 21f969e..82009a0 100644 --- a/src/utilities/Makefile.am +++ b/src/utilities/Makefile.am @@ -16,7 +16,7 @@ diff --git a/meta-openembedded/meta-oe/recipes-test/fwts/fwts_19.06.00.bb b/meta-openembedded/meta-oe/recipes-test/fwts/fwts_20.07.00.bb index 88a89fb0b..28565eb8c 100644 --- a/meta-openembedded/meta-oe/recipes-test/fwts/fwts_19.06.00.bb +++ b/meta-openembedded/meta-oe/recipes-test/fwts/fwts_20.07.00.bb @@ -5,8 +5,7 @@ HOMEPAGE = "https://wiki.ubuntu.com/Kernel/Reference/fwts" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://src/main.c;beginline=1;endline=16;md5=31da590f3e9f3bd34dcdb9e4db568519" -SRCREV = "b0ec7aa2ef743d113fd8c5e57c0ca3d5edd86f0e" -SRC_URI = "http://fwts.ubuntu.com/release/fwts-V19.06.00.tar.gz;subdir=${BPN}-${PV} \ +SRC_URI = "http://fwts.ubuntu.com/release/fwts-V${PV}.tar.gz;subdir=${BP} \ file://0001-Include-poll.h-instead-of-deprecated-sys-poll.h.patch \ file://0002-Define-__SWORD_TYPE-if-not-defined-by-libc.patch \ file://0003-Undefine-PAGE_SIZE.patch \ @@ -14,15 +13,14 @@ SRC_URI = "http://fwts.ubuntu.com/release/fwts-V19.06.00.tar.gz;subdir=${BPN}-${ file://0003-use-intptr_t-to-fix-pointer-to-int-cast-issues.patch \ file://0001-Remove-Werror-from-build.patch \ " -SRC_URI[md5sum] = "012f933329510cc5a71817ede681eee2" -SRC_URI[sha256sum] = "13aa991f12c69f48df368aae5e5d0fbc9136413b4bfe115421bc3216d919f8a2" +SRC_URI[sha256sum] = "4a8e0211b388efbcfcb6530297e9a924d0afa2d6db58e9db2f031129eda6d66f" COMPATIBLE_HOST = "(i.86|x86_64|aarch64|powerpc64).*-linux" DEPENDS = "libpcre json-c glib-2.0 dtc bison-native libbsd" DEPENDS_append_libc-musl = " libexecinfo" -inherit autotools bash-completion pkgconfig +inherit autotools-brokensep bash-completion pkgconfig CFLAGS += "-I${STAGING_INCDIR}/json-c -Wno-error=unknown-pragmas" LDFLAGS_append_libc-musl = " -lexecinfo" @@ -32,5 +30,3 @@ FILES_${PN}-dev += "${libdir}/fwts/lib*${SOLIBSDEV} ${libdir}/fwts/lib*.la" FILES_${PN}-staticdev += "${libdir}/fwts/lib*a" FILES_${PN}-dbg += "${libdir}/fwts/.debug" -TOOLCHAIN = "gcc" - |