public inbox for devicetree-compiler@vger.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Eli Schwartz <eschwartz93@gmail.com>
Cc: devicetree-compiler@vger.kernel.org
Subject: Re: [PATCH] meson: don't build test programs by default
Date: Mon, 3 Mar 2025 12:56:13 +1100	[thread overview]
Message-ID: <Z8UMPUk9h5ieMWr0@zatzit> (raw)
In-Reply-To: <20250302222839.2256985-1-eschwartz@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 1912 bytes --]

On Sun, Mar 02, 2025 at 05:28:26PM -0500, Eli Schwartz wrote:
> They are only used when running tests, and are included as depedencies
> of the test cases themselves already. Marking them to not build by
> default, means that 291 compile edges can be skipped when only running
> 
> ```
> meson setup builddir/
> ninja -C builddir/
> meson install -C builddir/
> ```
> 
> resulting in an overall much faster build. Instead they will be compiled
> on-demand by `meson test`, only for users that actually run the tests.
> 
> Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>

This also matches the behaviour of the legacy Makefiles.

Merged, thanks.

> ---
>  tests/meson.build | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/meson.build b/tests/meson.build
> index 9cf6e3d..f1044b9 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -1,7 +1,9 @@
>  trees = static_library('trees', files('trees.S'), c_args: '-D__ASSEMBLY__',
> +                       build_by_default: false,
>                         include_directories: libfdt_inc)
>  
>  dumptrees = executable('dumptrees', files('dumptrees.c'),
> +                       build_by_default: false,
>                         link_with: trees, dependencies: libfdt_dep)
>  
>  dumptrees_dtb = custom_target(
> @@ -111,7 +113,7 @@ endif
>  
>  tests_exe = []
>  foreach t: tests
> -  tests_exe += executable(t, files(t + '.c'), dependencies: test_deps, link_args: extra_link_args)
> +  tests_exe += executable(t, files(t + '.c'), dependencies: test_deps, link_args: extra_link_args, build_by_default: false)
>  endforeach
>  
>  run_tests = find_program('run_tests.sh')

-- 
David Gibson (he or they)	| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you, not the other way
				| around.
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2025-03-03  2:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-02 22:28 [PATCH] meson: don't build test programs by default Eli Schwartz
2025-03-03  1:56 ` David Gibson [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=Z8UMPUk9h5ieMWr0@zatzit \
    --to=david@gibson.dropbear.id.au \
    --cc=devicetree-compiler@vger.kernel.org \
    --cc=eschwartz93@gmail.com \
    /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