diff mbox

[1/7] Add package check: unit test library

Message ID 1435929086-21205-2-git-send-email-sylvain.raybaud@green-communications.fr
State Superseded
Headers show

Commit Message

Sylvain Raybaud July 3, 2015, 1:11 p.m. UTC
Signed-off-by: Sylvain Raybaud <sylvain.raybaud@green-communications.fr>
---
 package/Config.in        |  1 +
 package/check/Config.in  |  7 +++++++
 package/check/check.hash |  2 ++
 package/check/check.mk   | 20 ++++++++++++++++++++
 4 files changed, 30 insertions(+)
 create mode 100644 package/check/Config.in
 create mode 100644 package/check/check.hash
 create mode 100644 package/check/check.mk

Comments

Yann E. MORIN July 3, 2015, 6:34 p.m. UTC | #1
Sylvian, All,

On 2015-07-03 15:11 +0200, Sylvain Raybaud spake thusly:
> Signed-off-by: Sylvain Raybaud <sylvain.raybaud@green-communications.fr>
[--SNIP--]
> diff --git a/package/check/Config.in b/package/check/Config.in
> new file mode 100644
> index 0000000..8e7e3bc
> --- /dev/null
> +++ b/package/check/Config.in
> @@ -0,0 +1,7 @@
> +config BR2_PACKAGE_HOST_CHECK
> +	bool "host check"

No, this is not 'host check', this is just 'check'.

This location is not about the host packages, but about the target
packages.

Besides, nothing in your series depends on host-check.

[--SNIP--]
> diff --git a/package/check/check.hash b/package/check/check.hash
> new file mode 100644
> index 0000000..7d7e19b
> --- /dev/null
> +++ b/package/check/check.hash
> @@ -0,0 +1,2 @@
> +# Hash from: http://downloads.sourceforge.net/project/check/check/check-0.9.14.tar.gz

Correct URL is:
    http://sourceforge.net/projects/check/files/check/0.9.14/

> +sha1	4b79e2d485d014ddb438e322b64235347d57b0ff	check-0.9.14.tar.gz

Manually checked the hash to be OK.

> diff --git a/package/check/check.mk b/package/check/check.mk
> new file mode 100644
> index 0000000..3c2021c
> --- /dev/null
> +++ b/package/check/check.mk
> @@ -0,0 +1,20 @@
> +################################################################################
> +#
> +# check
> +#
> +################################################################################
> +
> +CHECK_VERSION = 0.9.14
> +CHECK_SOURCE = check-$(CHECK_VERSION).tar.gz
> +CHECK_SITE = http://downloads.sourceforge.net/project/check/check/$(CHECK_VERSION)/
> +
> +CHECK_DEPENDENCIES = libtool pkgconf

This is probably host-pkgconf instead of pkgconf.

> +CHECK_INSTALL_STAGING = YES
> +CHECK_INSTALL_TARGET = NO

Why don't you install on the target? check installs a shared library by
default, so you really want to install in the target.

Otherwise, explain why you don't.

> +CHECK_LICENSE =  LGPLv2.1

This is "or any later version", so:

    CHECK_LICENSE =  LGPLv2.1+

> +CHECK_LICENSE_FILES = COPYING.LESSER
> +
> +$(eval $(autotools-package))
> +$(eval $(host-autotools-package))

As said above, nothing in this series depends on host-check, so why are
you adding a host variant?
Thomas Petazzoni July 4, 2015, 9:08 a.m. UTC | #2
Dear Yann E. MORIN,

On Fri, 3 Jul 2015 20:34:34 +0200, Yann E. MORIN wrote:

> > --- /dev/null
> > +++ b/package/check/Config.in
> > @@ -0,0 +1,7 @@
> > +config BR2_PACKAGE_HOST_CHECK
> > +	bool "host check"
> 
> No, this is not 'host check', this is just 'check'.
> 
> This location is not about the host packages, but about the target
> packages.
> 
> Besides, nothing in your series depends on host-check.

See PATCH 3: there is check in GALERA_DEPENDENCIES, and there is a
host-galera package with no explicit HOST_GALERA_DEPENDENCIES. So
host-check is automatically part of HOST_GALERA_DEPENDENCIES.

However, I definitely agree that we don't need a Config.in menu for
host check, only for the target variant of it.

Thomas
Yann E. MORIN July 4, 2015, 6:25 p.m. UTC | #3
Thomas, All,

On 2015-07-04 11:08 +0200, Thomas Petazzoni spake thusly:
> On Fri, 3 Jul 2015 20:34:34 +0200, Yann E. MORIN wrote:
> > > --- /dev/null
> > > +++ b/package/check/Config.in
> > > @@ -0,0 +1,7 @@
> > > +config BR2_PACKAGE_HOST_CHECK
> > > +	bool "host check"
> > 
> > No, this is not 'host check', this is just 'check'.
> > 
> > This location is not about the host packages, but about the target
> > packages.
> > 
> > Besides, nothing in your series depends on host-check.
> 
> See PATCH 3: there is check in GALERA_DEPENDENCIES, and there is a
> host-galera package with no explicit HOST_GALERA_DEPENDENCIES. So
> host-check is automatically part of HOST_GALERA_DEPENDENCIES.

Ah, right. I saw the dependency on check, but did not think about the
automatically-inherited host dependency.

Regards,
Yann E. MORIN.
Sylvain Raybaud July 9, 2015, 12:51 p.m. UTC | #4
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yann, all,

On 03/07/2015 20:34, Yann E. MORIN wrote:
>> diff --git a/package/check/check.hash b/package/check/check.hash
>>> new file mode 100644 index 0000000..7d7e19b --- /dev/null +++
>>> b/package/check/check.hash @@ -0,0 +1,2 @@ +# Hash from:
>>> http://downloads.sourceforge.net/project/check/check/check-0.9.14.tar.gz
>
>>> 
Correct URL is:
> http://sourceforge.net/projects/check/files/check/0.9.14/

The hash is actually locally computed, so I guess it's just:
# Locally computed:

>>> diff --git a/package/check/check.mk b/package/check/check.mk 
>>> [..] +CHECK_INSTALL_STAGING = YES +CHECK_INSTALL_TARGET = NO
> Why don't you install on the target? check installs a shared
> library by default, so you really want to install in the target.
> 
> Otherwise, explain why you don't.
> 

Ah, right. Since check is used to build binaries specifically for
testing in my use case (galera), I thought I'd save some space by not
installing on target. But you're right, it's a bad idea and I'll
remove these lines.

Cheers,

- -- 
Sylvain Raybaud
www.green-communications.fr
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJVnm5kAAoJEEkkwl4JtJ9y66QP/2eT5UYOlpYXfN/UEo405082
SZ/QDNJv4m8FKLzuBNnRE5XQVIcHiNUmLJWqNrGbjeG+VnY+fbnAkZt3uPVSUY8O
u36Gs4H+3S1E7Pj6GQ0bQwz9Z4qTvIJuLTXdswtAv77Qv4uNjk5juJKrULUl8/j+
ssoBImlHY0nQVyP8xKOPlCNcrBWy8DfKQqKNkqLTvvIsqKE8gFNOsJPog9HrL56T
XRjTTK5VpXc6MuXWhd82AGTcng5S/3OBBJYN/8lTexNRdCF9y0haSyUR2MjDtb0y
LXyTm0fieaLwHfSqSUn+F/8YFN7P9wNZaWQcIlvznWFLZvhHNxUITuI1fWbNbAKY
ftIhq3RsZr2SFSj358i9GhSg50wGtWQ4HjwyZocG1nLPm2+SM+MtF7lbVQQtVc7U
jgXX6QxCd3UcgCCcOmN/XQV8H+mf96b9H76ArsG2W/TZYxBKArPnyNFmFIqMsH8G
Irih1lYrcDqpkmFripWtcdFnPjUAxUG1U01WnwGDKrvH3KE5b/YBDHfeorHjTYDs
nD4MYFnrqfOt+rpmt4np3BIXkUuTOYbQlfsB8IKdBQZF33O6U50jA+psiGJRmgkc
Z/awGe+L35kD7F1KV7fjyG5SeBFC9I8W4b1nTrG3Ww98k6Lsp4Osc+Rs48X5793l
4YLfcTO8MmMhSrXCLg7a
=DQZa
-----END PGP SIGNATURE-----
diff mbox

Patch

diff --git a/package/Config.in b/package/Config.in
index 13a7e74..72ec372 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1014,6 +1014,7 @@  menu "Other"
 	source "package/atf/Config.in"
 	source "package/bdwgc/Config.in"
 	source "package/boost/Config.in"
+	source "package/check/Config.in"
 	source "package/clapack/Config.in"
 	source "package/classpath/Config.in"
 	source "package/cppcms/Config.in"
diff --git a/package/check/Config.in b/package/check/Config.in
new file mode 100644
index 0000000..8e7e3bc
--- /dev/null
+++ b/package/check/Config.in
@@ -0,0 +1,7 @@ 
+config BR2_PACKAGE_HOST_CHECK
+	bool "host check"
+	select BR2_PACKAGE_LIBTOOL
+	select BR2_PACKAGE_PKGCONF
+	help
+	  Unit testing framework for C
+	  http://check.sourceforge.net/
diff --git a/package/check/check.hash b/package/check/check.hash
new file mode 100644
index 0000000..7d7e19b
--- /dev/null
+++ b/package/check/check.hash
@@ -0,0 +1,2 @@ 
+# Hash from: http://downloads.sourceforge.net/project/check/check/check-0.9.14.tar.gz
+sha1	4b79e2d485d014ddb438e322b64235347d57b0ff	check-0.9.14.tar.gz
diff --git a/package/check/check.mk b/package/check/check.mk
new file mode 100644
index 0000000..3c2021c
--- /dev/null
+++ b/package/check/check.mk
@@ -0,0 +1,20 @@ 
+################################################################################
+#
+# check
+#
+################################################################################
+
+CHECK_VERSION = 0.9.14
+CHECK_SOURCE = check-$(CHECK_VERSION).tar.gz
+CHECK_SITE = http://downloads.sourceforge.net/project/check/check/$(CHECK_VERSION)/
+
+CHECK_DEPENDENCIES = libtool pkgconf
+
+CHECK_INSTALL_STAGING = YES
+CHECK_INSTALL_TARGET = NO
+
+CHECK_LICENSE =  LGPLv2.1
+CHECK_LICENSE_FILES = COPYING.LESSER
+
+$(eval $(autotools-package))
+$(eval $(host-autotools-package))