Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] tests/meson.build: fix build on cross-compiled environments
Date: Wed, 13 Sep 2023 15:24:07 +0200	[thread overview]
Message-ID: <20230913132407.191913-1-mauro.chehab@linux.intel.com> (raw)

From: Mauro Carvalho Chehab <mchehab@kernel.org>

When using a cross-compilation build, test_list_target
won't be updated. So, it needs to be initialized as a blank
list, otherwise meson will abort with this error message:

	docs/reference/igt-gpu-tools/meson.build:58:1: ERROR: Unknown variable "test_list_target".

Tested using a cross-file named meson-core2.txt with:

	[properties]
	c_args = '-march=core2'

	[binaries]
	c = 'gcc'
	ar = 'ar'
	strip = 'strip'
	pkgconfig = 'pkg-config'

	[host_machine]
	system = 'linux'
	cpu_family = 'aarch64'
	cpu = 'aarch64'
	endian = 'little'

And running meson with:

	meson -Dxe_driver=enabled --cross-file meson-core2.txt core2

Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
 tests/meson.build | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/meson.build b/tests/meson.build
index 94b1e2e123ca..a754c7b7612b 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -464,6 +464,8 @@ if not meson.is_cross_build()
 		    command : [ gen_testlist, '@OUTPUT@', test_list ],
 		    install : true,
 		    install_dir : libexecdir)
+else
+	test_list_target = []
 endif
 
 test_executables += executable('gem_concurrent_all', 'intel/gem_concurrent_all.c',
-- 
2.41.0

             reply	other threads:[~2023-09-13 13:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-13 13:24 Mauro Carvalho Chehab [this message]
2023-09-13 14:30 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/meson.build: fix build on cross-compiled environments Patchwork
2023-09-13 14:31 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-09-13 16:34 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-09-14  9:43 ` [igt-dev] [PATCH i-g-t] " Kamil Konieczny
2023-09-14 13:29 ` Kamil Konieczny

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=20230913132407.191913-1-mauro.chehab@linux.intel.com \
    --to=mauro.chehab@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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