Skip to contentSkip to conversation

openblas: add an option to install tests on the target

PATCH Superseded Vicente Olivert Riera 2 participants 3 messages Jul 5, 2016 – Jul 8, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 openblas: add an option to install tests on the target

---
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(+)
package/openblas/Config.in +3 -0
index 51afaec..67dbf71 100644
@@ -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
package/openblas/openblas.mk +13 -0
index baeef05..a5e5100 100644
@@ -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))
Signature · 1 line
2.7.3
#1 lore raw

PATCH v2 1/1 openblas: add an option to install tests on the target

Hello,

package/openblas/openblas.mk define OPENBLAS_INSTALL_TARGET_CMDS · line 67

Quoted 12 lines · Vicente Olivert Riera
package/openblas/openblas.mk +12 -0
+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

To be honest, I really dislike such complicated install procedures. Could you instead work with upstream to have them add an appropriate target that allows to install the test programs?

Looking at the upstream Github repository, they look very active, so getting some feedback should be possible.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH v2 1/1 openblas: add an option to install tests on the target

Ok, I will try it.

Regards,

Vincent.

Quoted 28 lines · Thomas Petazzoni

Hello,

package/openblas/openblas.mk define OPENBLAS_INSTALL_TARGET_CMDS · line 67

Quoted 12 lines · Vicente Olivert Riera
package/openblas/openblas.mk +12 -0
+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

To be honest, I really dislike such complicated install procedures. Could you instead work with upstream to have them add an appropriate target that allows to install the test programs?

Looking at the upstream Github repository, they look very active, so getting some feedback should be possible.

Thanks,

Thomas