[igt-dev] [PATCH i-g-t] tests/meson.build: fix build on cross-compiled environments

Mauro Carvalho Chehab mauro.chehab at linux.intel.com
Wed Sep 13 13:24:07 UTC 2023


From: Mauro Carvalho Chehab <mchehab at 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 at 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



More information about the igt-dev mailing list