Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] openblas: add an option to install tests on the target
@ 2016-07-05 11:16 Vicente Olivert Riera
  2016-07-06 19:56 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Vicente Olivert Riera @ 2016-07-05 11:16 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
Changes v1 -> v2:
 - Also install some necessary input files for the tests.

 package/openblas/Config.in   |  3 +++
 package/openblas/openblas.mk | 13 +++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/package/openblas/Config.in b/package/openblas/Config.in
index 51afaec..67dbf71 100644
--- a/package/openblas/Config.in
+++ b/package/openblas/Config.in
@@ -59,4 +59,7 @@ config BR2_PACKAGE_OPENBLAS_TARGET
 	string "OpenBLAS target CPU"
 	default BR2_PACKAGE_OPENBLAS_DEFAULT_TARGET
 
+config BR2_PACKAGE_OPENBLAS_INSTALL_TESTS
+	bool "Install OpenBLAS tests"
+
 endif
diff --git a/package/openblas/openblas.mk b/package/openblas/openblas.mk
index baeef05..a5e5100 100644
--- a/package/openblas/openblas.mk
+++ b/package/openblas/openblas.mk
@@ -53,4 +53,17 @@ define OPENBLAS_INSTALL_TARGET_CMDS
 		-C $(@D) install PREFIX=$(TARGET_DIR)/usr
 endef
 
+ifeq ($(BR2_PACKAGE_OPENBLAS_INSTALL_TESTS),y)
+define OPENBLAS_INSTALL_TESTS
+	for i in test ctest utest; do \
+		mkdir -p $(TARGET_DIR)/usr/share/openblas/$$i && \
+		cd $(@D)/$$i && \
+		find . -type f -perm -a=x -exec $(INSTALL) -m 0755 {} $(TARGET_DIR)/usr/share/openblas/$$i/{} \; && \
+		find . -type f -name "?in*" -exec $(INSTALL) -m 0644 {} $(TARGET_DIR)/usr/share/openblas/$$i/{} \; && \
+		find . -type f -name "*.dat" -exec $(INSTALL) -m 0644 {} $(TARGET_DIR)/usr/share/openblas/$$i/{} \; ; \
+		done
+endef
+OPENBLAS_POST_INSTALL_TARGET_HOOKS += OPENBLAS_INSTALL_TESTS
+endif
+
 $(eval $(generic-package))
-- 
2.7.3

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

end of thread, other threads:[~2016-07-08 10:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-05 11:16 [Buildroot] [PATCH v2] openblas: add an option to install tests on the target Vicente Olivert Riera
2016-07-06 19:56 ` Thomas Petazzoni
2016-07-08 10:13   ` Vicente Olivert Riera

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox