* [meta-oe][PATCH] cmocka: add recipe
@ 2020-09-25 21:20 akuster
2020-09-26 0:07 ` [oe] " Khem Raj
0 siblings, 1 reply; 7+ messages in thread
From: akuster @ 2020-09-25 21:20 UTC (permalink / raw)
To: openembedded-devel; +Cc: Armin Kuster
From: Armin Kuster <akuster@mvista.com>
includes ptest and bundling of examples that can be used for testing
Signed-off-by: Armin Kuster <akuster@mvista.com>
---
meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb | 37 +++++++++++++++++++++
meta-oe/recipes-test/cmocka/files/run-ptest | 10 ++++++
2 files changed, 47 insertions(+)
create mode 100644 meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb
create mode 100644 meta-oe/recipes-test/cmocka/files/run-ptest
diff --git a/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb b/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb
new file mode 100644
index 0000000000..6125d116cd
--- /dev/null
+++ b/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb
@@ -0,0 +1,37 @@
+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 "
+
+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-oe/recipes-test/cmocka/files/run-ptest b/meta-oe/recipes-test/cmocka/files/run-ptest
new file mode 100644
index 0000000000..48b9cd9fc5
--- /dev/null
+++ b/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
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [oe] [meta-oe][PATCH] cmocka: add recipe
2020-09-25 21:20 [meta-oe][PATCH] cmocka: add recipe akuster
@ 2020-09-26 0:07 ` Khem Raj
2020-09-26 14:18 ` Khem Raj
0 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2020-09-26 0:07 UTC (permalink / raw)
To: akuster; +Cc: openembeded-devel, Armin Kuster
Can you add it to appropriate packagegroups too for testing purposes
On Fri, Sep 25, 2020 at 2:20 PM akuster <akuster808@gmail.com> wrote:
>
> From: Armin Kuster <akuster@mvista.com>
>
> includes ptest and bundling of examples that can be used for testing
>
> Signed-off-by: Armin Kuster <akuster@mvista.com>
> ---
> meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb | 37 +++++++++++++++++++++
> meta-oe/recipes-test/cmocka/files/run-ptest | 10 ++++++
> 2 files changed, 47 insertions(+)
> create mode 100644 meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb
> create mode 100644 meta-oe/recipes-test/cmocka/files/run-ptest
>
> diff --git a/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb b/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb
> new file mode 100644
> index 0000000000..6125d116cd
> --- /dev/null
> +++ b/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb
> @@ -0,0 +1,37 @@
> +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 "
> +
> +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-oe/recipes-test/cmocka/files/run-ptest b/meta-oe/recipes-test/cmocka/files/run-ptest
> new file mode 100644
> index 0000000000..48b9cd9fc5
> --- /dev/null
> +++ b/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
> --
> 2.17.1
>
>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [oe] [meta-oe][PATCH] cmocka: add recipe
2020-09-26 0:07 ` [oe] " Khem Raj
@ 2020-09-26 14:18 ` Khem Raj
2020-09-26 23:50 ` Khem Raj
0 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2020-09-26 14:18 UTC (permalink / raw)
To: akuster; +Cc: openembeded-devel, Armin Kuster
Now this recipe is added I wonder if libldb and samba can use this
copy instead of their internal version ?
On Fri, Sep 25, 2020 at 5:07 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> Can you add it to appropriate packagegroups too for testing purposes
>
> On Fri, Sep 25, 2020 at 2:20 PM akuster <akuster808@gmail.com> wrote:
> >
> > From: Armin Kuster <akuster@mvista.com>
> >
> > includes ptest and bundling of examples that can be used for testing
> >
> > Signed-off-by: Armin Kuster <akuster@mvista.com>
> > ---
> > meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb | 37 +++++++++++++++++++++
> > meta-oe/recipes-test/cmocka/files/run-ptest | 10 ++++++
> > 2 files changed, 47 insertions(+)
> > create mode 100644 meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb
> > create mode 100644 meta-oe/recipes-test/cmocka/files/run-ptest
> >
> > diff --git a/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb b/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb
> > new file mode 100644
> > index 0000000000..6125d116cd
> > --- /dev/null
> > +++ b/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb
> > @@ -0,0 +1,37 @@
> > +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 "
> > +
> > +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-oe/recipes-test/cmocka/files/run-ptest b/meta-oe/recipes-test/cmocka/files/run-ptest
> > new file mode 100644
> > index 0000000000..48b9cd9fc5
> > --- /dev/null
> > +++ b/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
> > --
> > 2.17.1
> >
> >
> >
> >
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [oe] [meta-oe][PATCH] cmocka: add recipe
2020-09-26 14:18 ` Khem Raj
@ 2020-09-26 23:50 ` Khem Raj
2020-09-27 0:40 ` akuster
2020-09-27 15:15 ` akuster
0 siblings, 2 replies; 7+ messages in thread
From: Khem Raj @ 2020-09-26 23:50 UTC (permalink / raw)
To: akuster; +Cc: openembeded-devel, Armin Kuster
fails on musl too
https://errors.yoctoproject.org/Errors/Details/500726/
On Sat, Sep 26, 2020 at 7:18 AM Khem Raj <raj.khem@gmail.com> wrote:
>
> Now this recipe is added I wonder if libldb and samba can use this
> copy instead of their internal version ?
>
> On Fri, Sep 25, 2020 at 5:07 PM Khem Raj <raj.khem@gmail.com> wrote:
> >
> > Can you add it to appropriate packagegroups too for testing purposes
> >
> > On Fri, Sep 25, 2020 at 2:20 PM akuster <akuster808@gmail.com> wrote:
> > >
> > > From: Armin Kuster <akuster@mvista.com>
> > >
> > > includes ptest and bundling of examples that can be used for testing
> > >
> > > Signed-off-by: Armin Kuster <akuster@mvista.com>
> > > ---
> > > meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb | 37 +++++++++++++++++++++
> > > meta-oe/recipes-test/cmocka/files/run-ptest | 10 ++++++
> > > 2 files changed, 47 insertions(+)
> > > create mode 100644 meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb
> > > create mode 100644 meta-oe/recipes-test/cmocka/files/run-ptest
> > >
> > > diff --git a/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb b/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb
> > > new file mode 100644
> > > index 0000000000..6125d116cd
> > > --- /dev/null
> > > +++ b/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb
> > > @@ -0,0 +1,37 @@
> > > +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 "
> > > +
> > > +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-oe/recipes-test/cmocka/files/run-ptest b/meta-oe/recipes-test/cmocka/files/run-ptest
> > > new file mode 100644
> > > index 0000000000..48b9cd9fc5
> > > --- /dev/null
> > > +++ b/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
> > > --
> > > 2.17.1
> > >
> > >
> > >
> > >
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [oe] [meta-oe][PATCH] cmocka: add recipe
2020-09-26 23:50 ` Khem Raj
@ 2020-09-27 0:40 ` akuster
2020-09-27 15:15 ` akuster
1 sibling, 0 replies; 7+ messages in thread
From: akuster @ 2020-09-27 0:40 UTC (permalink / raw)
To: Khem Raj; +Cc: openembeded-devel, Armin Kuster
On 9/26/20 4:50 PM, Khem Raj wrote:
> fails on musl too
> https://errors.yoctoproject.org/Errors/Details/500726/
ok. thanks. keep forgetting that use-case
-armin
>
> On Sat, Sep 26, 2020 at 7:18 AM Khem Raj <raj.khem@gmail.com> wrote:
>> Now this recipe is added I wonder if libldb and samba can use this
>> copy instead of their internal version ?
>>
>> On Fri, Sep 25, 2020 at 5:07 PM Khem Raj <raj.khem@gmail.com> wrote:
>>> Can you add it to appropriate packagegroups too for testing purposes
>>>
>>> On Fri, Sep 25, 2020 at 2:20 PM akuster <akuster808@gmail.com> wrote:
>>>> From: Armin Kuster <akuster@mvista.com>
>>>>
>>>> includes ptest and bundling of examples that can be used for testing
>>>>
>>>> Signed-off-by: Armin Kuster <akuster@mvista.com>
>>>> ---
>>>> meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb | 37 +++++++++++++++++++++
>>>> meta-oe/recipes-test/cmocka/files/run-ptest | 10 ++++++
>>>> 2 files changed, 47 insertions(+)
>>>> create mode 100644 meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb
>>>> create mode 100644 meta-oe/recipes-test/cmocka/files/run-ptest
>>>>
>>>> diff --git a/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb b/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb
>>>> new file mode 100644
>>>> index 0000000000..6125d116cd
>>>> --- /dev/null
>>>> +++ b/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb
>>>> @@ -0,0 +1,37 @@
>>>> +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 "
>>>> +
>>>> +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-oe/recipes-test/cmocka/files/run-ptest b/meta-oe/recipes-test/cmocka/files/run-ptest
>>>> new file mode 100644
>>>> index 0000000000..48b9cd9fc5
>>>> --- /dev/null
>>>> +++ b/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
>>>> --
>>>> 2.17.1
>>>>
>>>>
>>>>
>>>>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [oe] [meta-oe][PATCH] cmocka: add recipe
2020-09-26 23:50 ` Khem Raj
2020-09-27 0:40 ` akuster
@ 2020-09-27 15:15 ` akuster
1 sibling, 0 replies; 7+ messages in thread
From: akuster @ 2020-09-27 15:15 UTC (permalink / raw)
To: Khem Raj; +Cc: openembeded-devel, Armin Kuster
On 9/26/20 4:50 PM, Khem Raj wrote:
> fails on musl too
> https://errors.yoctoproject.org/Errors/Details/500726/
this fix looks promising.
https://git.cryptomilk.org/projects/cmocka.git/commit/?id=28ce16b29911e5adc60140b572dee177adc7a178
>
> On Sat, Sep 26, 2020 at 7:18 AM Khem Raj <raj.khem@gmail.com> wrote:
>> Now this recipe is added I wonder if libldb and samba can use this
>> copy instead of their internal version ?
>>
>> On Fri, Sep 25, 2020 at 5:07 PM Khem Raj <raj.khem@gmail.com> wrote:
>>> Can you add it to appropriate packagegroups too for testing purposes
>>>
>>> On Fri, Sep 25, 2020 at 2:20 PM akuster <akuster808@gmail.com> wrote:
>>>> From: Armin Kuster <akuster@mvista.com>
>>>>
>>>> includes ptest and bundling of examples that can be used for testing
>>>>
>>>> Signed-off-by: Armin Kuster <akuster@mvista.com>
>>>> ---
>>>> meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb | 37 +++++++++++++++++++++
>>>> meta-oe/recipes-test/cmocka/files/run-ptest | 10 ++++++
>>>> 2 files changed, 47 insertions(+)
>>>> create mode 100644 meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb
>>>> create mode 100644 meta-oe/recipes-test/cmocka/files/run-ptest
>>>>
>>>> diff --git a/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb b/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb
>>>> new file mode 100644
>>>> index 0000000000..6125d116cd
>>>> --- /dev/null
>>>> +++ b/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb
>>>> @@ -0,0 +1,37 @@
>>>> +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 "
>>>> +
>>>> +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-oe/recipes-test/cmocka/files/run-ptest b/meta-oe/recipes-test/cmocka/files/run-ptest
>>>> new file mode 100644
>>>> index 0000000000..48b9cd9fc5
>>>> --- /dev/null
>>>> +++ b/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
>>>> --
>>>> 2.17.1
>>>>
>>>>
>>>>
>>>>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [meta-oe][PATCH] cmocka: add recipe
@ 2020-09-28 2:55 akuster
0 siblings, 0 replies; 7+ messages in thread
From: akuster @ 2020-09-28 2:55 UTC (permalink / raw)
To: openembedded-devel
includes ptest and bundling of examples that can be used for testing
Signed-off-by: Armin Kuster <akuster808@gmail.com>
--
V2]
Backport the OE Samba fix
amba: fix build on qemumips64 with musl
https://git.openembedded.org/meta-openembedded/commit/meta-networking/recipes-connectivity/samba?id=b758150d30a5fbdc47c465d0e9dca3a7e6d71f3c
The cmocka fix "Don't redefine uintptr_t" did not address the musl failure.
https://git.cryptomilk.org/projects/cmocka.git/commit/?id=28ce16b29911e5adc60140b572dee177adc7a178
WIll have to submit the samba fix to cmacka and see how it goes.
---
meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb | 39 ++++++++++++++
.../cmocka/files/cmocka-uintptr_t.patch | 53 +++++++++++++++++++
meta-oe/recipes-test/cmocka/files/run-ptest | 10 ++++
3 files changed, 102 insertions(+)
create mode 100644 meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb
create mode 100644 meta-oe/recipes-test/cmocka/files/cmocka-uintptr_t.patch
create mode 100644 meta-oe/recipes-test/cmocka/files/run-ptest
diff --git a/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb b/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb
new file mode 100644
index 0000000000..5aee5ef931
--- /dev/null
+++ b/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-oe/recipes-test/cmocka/files/cmocka-uintptr_t.patch b/meta-oe/recipes-test/cmocka/files/cmocka-uintptr_t.patch
new file mode 100644
index 0000000000..8d3b73b631
--- /dev/null
+++ b/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-oe/recipes-test/cmocka/files/run-ptest b/meta-oe/recipes-test/cmocka/files/run-ptest
new file mode 100644
index 0000000000..48b9cd9fc5
--- /dev/null
+++ b/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
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-09-28 2:55 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-25 21:20 [meta-oe][PATCH] cmocka: add recipe akuster
2020-09-26 0:07 ` [oe] " Khem Raj
2020-09-26 14:18 ` Khem Raj
2020-09-26 23:50 ` Khem Raj
2020-09-27 0:40 ` akuster
2020-09-27 15:15 ` akuster
2020-09-28 2:55 akuster
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.