All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/cunit: new package
@ 2018-11-01 18:58 Matt Weber
  2018-11-01 18:58 ` [Buildroot] [PATCH 2/2] package/libdrm: correct cunit test dependency Matt Weber
  2018-11-29 21:53 ` [Buildroot] [PATCH 1/2] package/cunit: new package Thomas Petazzoni
  0 siblings, 2 replies; 5+ messages in thread
From: Matt Weber @ 2018-11-01 18:58 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
---
 DEVELOPERS               |  1 +
 package/Config.in        |  1 +
 package/cunit/Config.in  |  6 ++++++
 package/cunit/cunit.hash |  3 +++
 package/cunit/cunit.mk   | 17 +++++++++++++++++
 5 files changed, 28 insertions(+)
 create mode 100644 package/cunit/Config.in
 create mode 100644 package/cunit/cunit.hash
 create mode 100644 package/cunit/cunit.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index a3d97eb..d91a093 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1348,6 +1348,7 @@ F:	package/checkpolicy/
 F:	package/checksec/
 F:	package/cgroupfs-mount/
 F:	package/crda/
+F:	package/cunit/
 F:	package/devmem2/
 F:	package/dnsmasq/
 F:	package/dosfstools/
diff --git a/package/Config.in b/package/Config.in
index 7e8224c..c27253c 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -141,6 +141,7 @@ menu "Development tools"
 	source "package/check/Config.in"
 	source "package/cmake/Config.in"
 	source "package/cppunit/Config.in"
+	source "package/cunit/Config.in"
 	source "package/cvs/Config.in"
 	source "package/cxxtest/Config.in"
 	source "package/diffutils/Config.in"
diff --git a/package/cunit/Config.in b/package/cunit/Config.in
new file mode 100644
index 0000000..8bcfa2a
--- /dev/null
+++ b/package/cunit/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_CUNIT
+	bool "cunit"
+	help
+	  An automated testing framework in 'C'.
+
+	  http://cunit.sourceforge.net/
diff --git a/package/cunit/cunit.hash b/package/cunit/cunit.hash
new file mode 100644
index 0000000..bbd43a7
--- /dev/null
+++ b/package/cunit/cunit.hash
@@ -0,0 +1,3 @@
+# Locally calculated:
+sha256 f5b29137f845bb08b77ec60584fdb728b4e58f1023e6f249a464efa49a40f214  CUnit-2.1-3.tar.bz2
+sha256 5d9d73d41a57dd2f34487ef3978a2c13cdb97294baeeb81fcd274796399eb15f  COPYING
diff --git a/package/cunit/cunit.mk b/package/cunit/cunit.mk
new file mode 100644
index 0000000..df300fd
--- /dev/null
+++ b/package/cunit/cunit.mk
@@ -0,0 +1,17 @@
+################################################################################
+#
+# cunit
+#
+################################################################################
+
+CUNIT_VERSION = 2.1-3
+CUNIT_SITE = http://downloads.sourceforge.net/project/cunit/CUnit/$(CUNIT_VERSION)
+CUNIT_SOURCE = CUnit-$(CUNIT_VERSION).tar.bz2
+CUNIT_INSTALL_STAGING = YES
+CUNIT_LICENSE = LGPL-2.0
+CUNIT_LICENSE_FILES = COPYING
+
+# The source archive does not have the autoconf/automake material generated.
+CUNIT_AUTORECONF = YES
+
+$(eval $(autotools-package))
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 2/2] package/libdrm: correct cunit test dependency
  2018-11-01 18:58 [Buildroot] [PATCH 1/2] package/cunit: new package Matt Weber
@ 2018-11-01 18:58 ` Matt Weber
  2018-11-29 21:54   ` Thomas Petazzoni
  2018-11-29 21:53 ` [Buildroot] [PATCH 1/2] package/cunit: new package Thomas Petazzoni
  1 sibling, 1 reply; 5+ messages in thread
From: Matt Weber @ 2018-11-01 18:58 UTC (permalink / raw)
  To: buildroot

Previously the option to install tests would result in the test
cases that don't have a cunit dependency, to build and be installed.

This patch adds the cunit dependency so all test cases are built and
installed to target when that is selected via kconfig.

Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
---
 package/libdrm/Config.in | 1 +
 package/libdrm/libdrm.mk | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/package/libdrm/Config.in b/package/libdrm/Config.in
index 581f921..9dd1fb7 100644
--- a/package/libdrm/Config.in
+++ b/package/libdrm/Config.in
@@ -99,6 +99,7 @@ config BR2_PACKAGE_LIBDRM_VC4
 
 config BR2_PACKAGE_LIBDRM_INSTALL_TESTS
 	bool "Install test programs"
+	select BR2_PACKAGE_CUNIT
 	help
 	  This option allows to install the libdrm test programs.
 
diff --git a/package/libdrm/libdrm.mk b/package/libdrm/libdrm.mk
index 18ef9cd..e927dd1 100644
--- a/package/libdrm/libdrm.mk
+++ b/package/libdrm/libdrm.mk
@@ -115,6 +115,9 @@ endif
 
 ifeq ($(BR2_PACKAGE_LIBDRM_INSTALL_TESTS),y)
 LIBDRM_CONF_OPTS += --enable-install-test-programs
+# By default most of the test cases with automatically
+# be disabled if cunit is not present
+LIBDRM_DEPENDENCIES += cunit
 endif
 
 $(eval $(autotools-package))
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 1/2] package/cunit: new package
  2018-11-01 18:58 [Buildroot] [PATCH 1/2] package/cunit: new package Matt Weber
  2018-11-01 18:58 ` [Buildroot] [PATCH 2/2] package/libdrm: correct cunit test dependency Matt Weber
@ 2018-11-29 21:53 ` Thomas Petazzoni
  1 sibling, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2018-11-29 21:53 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu,  1 Nov 2018 13:58:15 -0500, Matt Weber wrote:

> +CUNIT_VERSION = 2.1-3
> +CUNIT_SITE = http://downloads.sourceforge.net/project/cunit/CUnit/$(CUNIT_VERSION)
> +CUNIT_SOURCE = CUnit-$(CUNIT_VERSION).tar.bz2
> +CUNIT_INSTALL_STAGING = YES
> +CUNIT_LICENSE = LGPL-2.0

Actually the license is LGPL-2.0+.

I've applied to next after fixing this. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 2/2] package/libdrm: correct cunit test dependency
  2018-11-01 18:58 ` [Buildroot] [PATCH 2/2] package/libdrm: correct cunit test dependency Matt Weber
@ 2018-11-29 21:54   ` Thomas Petazzoni
  2018-11-29 22:19     ` Matthew Weber
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2018-11-29 21:54 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu,  1 Nov 2018 13:58:16 -0500, Matt Weber wrote:
> Previously the option to install tests would result in the test
> cases that don't have a cunit dependency, to build and be installed.
> 
> This patch adds the cunit dependency so all test cases are built and
> installed to target when that is selected via kconfig.

Looking at the libdrm build system, only the tests specific to  the
amdgpu backend/driver need cunit. So when you say "By default most of
the test cases will automatically be disabled if cunit is not present"
doesn't seem really accurate. So I've changed this patch to make cunit
an optional dependency: if it's there, we use it, otherwise, fine, we
have some tests, but not the amdgpu tests.

Did I miss something?

Anyway, I've applied the patch that adds it as an optional dependency
to the next branch.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 2/2] package/libdrm: correct cunit test dependency
  2018-11-29 21:54   ` Thomas Petazzoni
@ 2018-11-29 22:19     ` Matthew Weber
  0 siblings, 0 replies; 5+ messages in thread
From: Matthew Weber @ 2018-11-29 22:19 UTC (permalink / raw)
  To: buildroot

Thomas,


On Thu, Nov 29, 2018 at 3:55 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello,
>
> On Thu,  1 Nov 2018 13:58:16 -0500, Matt Weber wrote:
> > Previously the option to install tests would result in the test
> > cases that don't have a cunit dependency, to build and be installed.
> >
> > This patch adds the cunit dependency so all test cases are built and
> > installed to target when that is selected via kconfig.
>
> Looking at the libdrm build system, only the tests specific to  the
> amdgpu backend/driver need cunit. So when you say "By default most of
> the test cases will automatically be disabled if cunit is not present"
> doesn't seem really accurate. So I've changed this patch to make cunit
> an optional dependency: if it's there, we use it, otherwise, fine, we
> have some tests, but not the amdgpu tests.
>
> Did I miss something?

No, that should be ok.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-11-29 22:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-01 18:58 [Buildroot] [PATCH 1/2] package/cunit: new package Matt Weber
2018-11-01 18:58 ` [Buildroot] [PATCH 2/2] package/libdrm: correct cunit test dependency Matt Weber
2018-11-29 21:54   ` Thomas Petazzoni
2018-11-29 22:19     ` Matthew Weber
2018-11-29 21:53 ` [Buildroot] [PATCH 1/2] package/cunit: new package Thomas Petazzoni

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.