Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Julien Olivain <ju.o@free.fr>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/2] package/openblas: add a new option to install tests
Date: Mon, 8 May 2023 22:56:46 +0200	[thread overview]
Message-ID: <20230508205646.GS252090@scaer> (raw)
In-Reply-To: <20230508181001.18771-1-ju.o@free.fr>

Julien, All,

On 2023-05-08 20:10 +0200, Julien Olivain spake thusly:
> This option can be used for runtime testing or package debugging.
> 
> Signed-off-by: Julien Olivain <ju.o@free.fr>

Following our IRC discussion, and the various quick tests I did, it
looks like tests are always built, in fact. The only reason a test would
not be built, would be if BUILD_SINGLE et al. would be disabled.

We do not offer that possibility in Buildroot, but maybe that is
autodetected by openblas, where it would disable some stuff based on the
target processor (or whatever).

So, I tweaked the comment. It does not change much rom what you wrote.
in the end...

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  package/openblas/Config.in   |  5 +++++
>  package/openblas/openblas.mk | 18 ++++++++++++++++++
>  2 files changed, 23 insertions(+)
> 
> diff --git a/package/openblas/Config.in b/package/openblas/Config.in
> index 0144e93a3f..58976e657a 100644
> --- a/package/openblas/Config.in
> +++ b/package/openblas/Config.in
> @@ -94,4 +94,9 @@ config BR2_PACKAGE_OPENBLAS_USE_LOCKING
>  	  function calls from multiple threads, then locking is
>  	  mandatory for correct operation.
>  
> +config BR2_PACKAGE_OPENBLAS_INSTALL_TESTS
> +	bool "install tests"
> +	help
> +	  Install C test programs on target.
> +
>  endif
> diff --git a/package/openblas/openblas.mk b/package/openblas/openblas.mk
> index f7a50d7bc7..3fa0bbfce7 100644
> --- a/package/openblas/openblas.mk
> +++ b/package/openblas/openblas.mk
> @@ -77,4 +77,22 @@ define OPENBLAS_INSTALL_TARGET_CMDS
>  		-C $(@D) install PREFIX=$(TARGET_DIR)/usr
>  endef
>  
> +ifeq ($(BR2_PACKAGE_OPENBLAS_INSTALL_TESTS),y)
> +# The actual test list depends on the architecture and/or some build
> +# options. This macro installs all the test programs and input data
> +# found in the ctest build directory.
> +define OPENBLAS_INSTALL_TESTS
> +	mkdir -p $(TARGET_DIR)/usr/libexec/openblas/tests
> +	find $(@D)/ctest \
> +		-type f -name "x[sdcz]cblat[123]" -perm -0100 \
> +		-exec $(INSTALL) -m 0755 {} \
> +			$(TARGET_DIR)/usr/libexec/openblas/tests \;
> +	find $(@D)/ctest \
> +		-type f -name "[sdcz]in[123]" \
> +		-exec $(INSTALL) -m 0644 {} \
> +			$(TARGET_DIR)/usr/libexec/openblas/tests \;
> +endef
> +OPENBLAS_POST_INSTALL_TARGET_HOOKS += OPENBLAS_INSTALL_TESTS
> +endif
> +
>  $(eval $(generic-package))
> -- 
> 2.40.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      parent reply	other threads:[~2023-05-08 20:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-08 18:10 [Buildroot] [PATCH 1/2] package/openblas: add a new option to install tests Julien Olivain
2023-05-08 18:10 ` [Buildroot] [PATCH 2/2] support/testing/tests/package/test_openblas.py: new runtime test Julien Olivain
2023-05-08 20:56 ` Yann E. MORIN [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230508205646.GS252090@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=ju.o@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox