* [ptxdist] [PATCH v3 0/3] cmocka: new package
@ 2020-01-02 21:36 Alexander Dahl
2020-01-02 21:36 ` [ptxdist] [PATCH v3 1/3] " Alexander Dahl
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Alexander Dahl @ 2020-01-02 21:36 UTC (permalink / raw)
To: ptxdist; +Cc: Alexander Dahl, Rouven Czerwinski
Hei hei,
this basically adds the version bump of opensc from 0.19.0 to 0.20.0,
so now that one builds with cmocka tests. The cmocka part of this
series did not change and I already had some practical experience with
that in December. Works for me. ;-)
For the OpenSC part: please test! I don't use that, I was just curious
if those unit tests previously marked broken would build now cmocka is
available. ;-)
Greets
Alex
Alexander Dahl (3):
cmocka: new package
opensc: version bump 0.19.0 -> 0.20.0
opensc: Reactivate testsuite option
rules/cmocka.in | 13 ++++++++++
rules/cmocka.make | 60 +++++++++++++++++++++++++++++++++++++++++++++++
rules/opensc.in | 4 ++--
rules/opensc.make | 14 +++++++----
4 files changed, 84 insertions(+), 7 deletions(-)
create mode 100644 rules/cmocka.in
create mode 100644 rules/cmocka.make
--
2.20.1
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ptxdist] [PATCH v3 1/3] cmocka: new package
2020-01-02 21:36 [ptxdist] [PATCH v3 0/3] cmocka: new package Alexander Dahl
@ 2020-01-02 21:36 ` Alexander Dahl
2020-01-02 21:36 ` [ptxdist] [PATCH v3 2/3] opensc: version bump 0.19.0 -> 0.20.0 Alexander Dahl
2020-01-02 21:36 ` [ptxdist] [PATCH v3 3/3] opensc: Reactivate testsuite option Alexander Dahl
2 siblings, 0 replies; 5+ messages in thread
From: Alexander Dahl @ 2020-01-02 21:36 UTC (permalink / raw)
To: ptxdist; +Cc: Alexander Dahl, Rouven Czerwinski
From: Alexander Dahl <ada@thorsis.com>
This adds the unit testing framework for C called 'cmocka'.
Signed-off-by: Alexander Dahl <ada@thorsis.com>
---
Notes:
v1 -> v2:
* use make $(basename …) for building URL from VERSION
rules/cmocka.in | 13 ++++++++++
rules/cmocka.make | 60 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 73 insertions(+)
create mode 100644 rules/cmocka.in
create mode 100644 rules/cmocka.make
diff --git a/rules/cmocka.in b/rules/cmocka.in
new file mode 100644
index 000000000..d18cf00ff
--- /dev/null
+++ b/rules/cmocka.in
@@ -0,0 +1,13 @@
+## SECTION=test_suites
+
+config CMOCKA
+ tristate
+ prompt "cmocka"
+ select HOST_CMAKE
+ help
+ 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.
+
+# vim: ft=kconfig noet tw=72 ts=8 sw=8
diff --git a/rules/cmocka.make b/rules/cmocka.make
new file mode 100644
index 000000000..a25939bbe
--- /dev/null
+++ b/rules/cmocka.make
@@ -0,0 +1,60 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2019 by Alexander Dahl <ada@thorsis.com>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_CMOCKA) += cmocka
+
+#
+# Paths and names
+#
+CMOCKA_VERSION := 1.1.5
+CMOCKA_MD5 := 91f95cd5db88b9b120d191b18d367193
+CMOCKA := cmocka-$(CMOCKA_VERSION)
+CMOCKA_SUFFIX := tar.xz
+CMOCKA_URL := https://cmocka.org/files/$(basename $(CMOCKA_VERSION))/$(CMOCKA).$(CMOCKA_SUFFIX)
+CMOCKA_SOURCE := $(SRCDIR)/$(CMOCKA).$(CMOCKA_SUFFIX)
+CMOCKA_DIR := $(BUILDDIR)/$(CMOCKA)
+CMOCKA_LICENSE := Apache-2.0
+CMOCKA_LICENSE_FILES := file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+CMOCKA_CONF_TOOL := cmake
+CMOCKA_CONF_OPT := \
+ $(CROSS_CMAKE_USR) \
+ -DBUILD_TESTING=OFF \
+ -DPICKY_DEVELOPER:BOOL=OFF \
+ -DUNIT_TESTING:BOOL=OFF \
+ -DWITH_CMOCKERY_SUPPORT:BOOL=OFF \
+ -DWITH_EXAMPLES:BOOL=OFF \
+ -DWITH_STATIC_LIB=OFF
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/cmocka.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, cmocka)
+ @$(call install_fixup, cmocka,PRIORITY,optional)
+ @$(call install_fixup, cmocka,SECTION,base)
+ @$(call install_fixup, cmocka,AUTHOR,"Alexander Dahl <ada@thorsis.com>")
+ @$(call install_fixup, cmocka,DESCRIPTION,missing)
+
+ @$(call install_lib, cmocka, 0, 0, 0644, libcmocka)
+
+ @$(call install_finish, cmocka)
+
+ @$(call touch)
+
+# vim: ft=make noet tw=72 ts=8 sw=8
--
2.20.1
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ptxdist] [PATCH v3 2/3] opensc: version bump 0.19.0 -> 0.20.0
2020-01-02 21:36 [ptxdist] [PATCH v3 0/3] cmocka: new package Alexander Dahl
2020-01-02 21:36 ` [ptxdist] [PATCH v3 1/3] " Alexander Dahl
@ 2020-01-02 21:36 ` Alexander Dahl
2020-01-06 16:04 ` Michael Olbrich
2020-01-02 21:36 ` [ptxdist] [PATCH v3 3/3] opensc: Reactivate testsuite option Alexander Dahl
2 siblings, 1 reply; 5+ messages in thread
From: Alexander Dahl @ 2020-01-02 21:36 UTC (permalink / raw)
To: ptxdist; +Cc: Alexander Dahl, Rouven Czerwinski
Signed-off-by: Alexander Dahl <post@lespocky.de>
---
rules/opensc.make | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/rules/opensc.make b/rules/opensc.make
index 80f578d03..b4ec2d623 100644
--- a/rules/opensc.make
+++ b/rules/opensc.make
@@ -15,9 +15,9 @@ PACKAGES-$(PTXCONF_OPENSC) += opensc
#
# Paths and names
#
-OPENSC_VERSION := 0.19.0
-OPENSC_MD5 := 40734b2343cf83c62c4c403f8a37475e
-OPENSC := OpenSC-$(OPENSC_VERSION)
+OPENSC_VERSION := 0.20.0
+OPENSC_MD5 := c291219b6189793430f9d0c40b42b907
+OPENSC := opensc-$(OPENSC_VERSION)
OPENSC_SUFFIX := tar.gz
OPENSC_URL := https://github.com/OpenSC/OpenSC/releases/download/$(OPENSC_VERSION)/$(OPENSC).$(OPENSC_SUFFIX)
OPENSC_SOURCE := $(SRCDIR)/$(OPENSC).$(OPENSC_SUFFIX)
@@ -39,6 +39,7 @@ OPENSC_CONF_OPT := \
$(CROSS_AUTOCONF_USR) \
--sysconfdir=/etc/opensc \
--enable-optimization \
+ --disable-fuzzing \
--disable-strict \
--disable-pedantic \
--enable-thread-locking \
@@ -56,8 +57,11 @@ OPENSC_CONF_OPT := \
--disable-doc \
--disable-dnie-ui \
--disable-notify \
- --$(call ptx/endis,PTXCONF_OPENSC_TESTSUITE)-tests \
- --disable-static
+ --disable-autostart-items \
+ --$(call ptx/endis,PTXCONF_OPENSC_TESTSUITE)-cmocka \
+ --disable-static \
+ --disable-assert \
+ --without-cygwin-native
# ----------------------------------------------------------------------------
# Target-Install
--
2.20.1
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ptxdist] [PATCH v3 3/3] opensc: Reactivate testsuite option
2020-01-02 21:36 [ptxdist] [PATCH v3 0/3] cmocka: new package Alexander Dahl
2020-01-02 21:36 ` [ptxdist] [PATCH v3 1/3] " Alexander Dahl
2020-01-02 21:36 ` [ptxdist] [PATCH v3 2/3] opensc: version bump 0.19.0 -> 0.20.0 Alexander Dahl
@ 2020-01-02 21:36 ` Alexander Dahl
2 siblings, 0 replies; 5+ messages in thread
From: Alexander Dahl @ 2020-01-02 21:36 UTC (permalink / raw)
To: ptxdist; +Cc: Alexander Dahl, Rouven Czerwinski
Signed-off-by: Alexander Dahl <post@lespocky.de>
---
rules/opensc.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rules/opensc.in b/rules/opensc.in
index eeda1e43d..c6a00419e 100644
--- a/rules/opensc.in
+++ b/rules/opensc.in
@@ -7,6 +7,7 @@ menuconfig OPENSC
select OPENCT if OPENSC_OPENCT
select PCSC_LITE if OPENSC_PCSC
select OPENSSL if OPENSC_OPENSSL
+ select CMOCKA if OPENSC_TESTSUITE
help
Smart card utilities with support for PKCS#15 compatible cards
@@ -44,8 +45,7 @@ config OPENSC_TOOLS
bool "install tools"
config OPENSC_TESTSUITE
- # needs cmocka
- depends on BROKEN
bool "install testsuite"
+ select OPENSC_OPENSSL
endif
--
2.20.1
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] [PATCH v3 2/3] opensc: version bump 0.19.0 -> 0.20.0
2020-01-02 21:36 ` [ptxdist] [PATCH v3 2/3] opensc: version bump 0.19.0 -> 0.20.0 Alexander Dahl
@ 2020-01-06 16:04 ` Michael Olbrich
0 siblings, 0 replies; 5+ messages in thread
From: Michael Olbrich @ 2020-01-06 16:04 UTC (permalink / raw)
To: ptxdist; +Cc: Alexander Dahl, Rouven Czerwinski
On Thu, Jan 02, 2020 at 10:36:24PM +0100, Alexander Dahl wrote:
> Signed-off-by: Alexander Dahl <post@lespocky.de>
> ---
> rules/opensc.make | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/rules/opensc.make b/rules/opensc.make
> index 80f578d03..b4ec2d623 100644
> --- a/rules/opensc.make
> +++ b/rules/opensc.make
> @@ -15,9 +15,9 @@ PACKAGES-$(PTXCONF_OPENSC) += opensc
> #
> # Paths and names
> #
> -OPENSC_VERSION := 0.19.0
> -OPENSC_MD5 := 40734b2343cf83c62c4c403f8a37475e
> -OPENSC := OpenSC-$(OPENSC_VERSION)
> +OPENSC_VERSION := 0.20.0
> +OPENSC_MD5 := c291219b6189793430f9d0c40b42b907
> +OPENSC := opensc-$(OPENSC_VERSION)
> OPENSC_SUFFIX := tar.gz
> OPENSC_URL := https://github.com/OpenSC/OpenSC/releases/download/$(OPENSC_VERSION)/$(OPENSC).$(OPENSC_SUFFIX)
> OPENSC_SOURCE := $(SRCDIR)/$(OPENSC).$(OPENSC_SUFFIX)
> @@ -39,6 +39,7 @@ OPENSC_CONF_OPT := \
> $(CROSS_AUTOCONF_USR) \
> --sysconfdir=/etc/opensc \
> --enable-optimization \
> + --disable-fuzzing \
> --disable-strict \
> --disable-pedantic \
> --enable-thread-locking \
> @@ -56,8 +57,11 @@ OPENSC_CONF_OPT := \
> --disable-doc \
> --disable-dnie-ui \
> --disable-notify \
> - --$(call ptx/endis,PTXCONF_OPENSC_TESTSUITE)-tests \
> - --disable-static
> + --disable-autostart-items \
> + --$(call ptx/endis,PTXCONF_OPENSC_TESTSUITE)-cmocka \
> + --disable-static \
> + --disable-assert \
> + --without-cygwin-native
There is a host-opensc package that needs similar configure option changes.
Michael
>
> # ----------------------------------------------------------------------------
> # Target-Install
> --
> 2.20.1
>
>
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-01-06 16:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-02 21:36 [ptxdist] [PATCH v3 0/3] cmocka: new package Alexander Dahl
2020-01-02 21:36 ` [ptxdist] [PATCH v3 1/3] " Alexander Dahl
2020-01-02 21:36 ` [ptxdist] [PATCH v3 2/3] opensc: version bump 0.19.0 -> 0.20.0 Alexander Dahl
2020-01-06 16:04 ` Michael Olbrich
2020-01-02 21:36 ` [ptxdist] [PATCH v3 3/3] opensc: Reactivate testsuite option Alexander Dahl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox