From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t v2] tests/meson.build: only generate testlists on native builds
Date: Thu, 31 Aug 2023 13:44:38 +0200 [thread overview]
Message-ID: <20230831114454.460399-1-mauro.chehab@linux.intel.com> (raw)
From: Mauro Carvalho Chehab <mchehab@kernel.org>
cross-compiling will produce binaries that don't run at the
build machine. On such cases, we cannot produce testlist files.
Detect it, to avoid IGT builds to fail on cross builds.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
v2: no changes. Just rebased on the top of upstream/master
tests/meson.build | 96 +++++++++++++++++++++++++++--------------------
1 file changed, 56 insertions(+), 40 deletions(-)
diff --git a/tests/meson.build b/tests/meson.build
index c683e468da78..adb178d0bd39 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -370,11 +370,13 @@ foreach prog : test_progs
test_executables += testexe
test_list += prog
name = prog.split('/').get(-1)
- testlist_files += custom_target(name + '.testlist',
- build_by_default : true,
- command : [testexe, '--show-testlist'],
- capture : true,
- output : name + '.testlist')
+ if not meson.is_cross_build()
+ testlist_files += custom_target(name + '.testlist',
+ build_by_default : true,
+ command : [testexe, '--show-testlist'],
+ capture : true,
+ output : name + '.testlist')
+ endif
endforeach
foreach prog : i915_progs
@@ -387,11 +389,13 @@ foreach prog : i915_progs
test_executables += testexe
test_list += prog
name = prog.split('/').get(-1)
- testlist_files += custom_target(name + '.testlist',
- build_by_default : true,
- command : [testexe, '--show-testlist'],
- capture : true,
- output : name + '.testlist')
+ if not meson.is_cross_build()
+ testlist_files += custom_target(name + '.testlist',
+ build_by_default : true,
+ command : [testexe, '--show-testlist'],
+ capture : true,
+ output : name + '.testlist')
+ endif
endforeach
if build_xe
@@ -405,11 +409,13 @@ if build_xe
test_list += prog
test_executables += testexe
name = prog.split('/').get(-1)
- testlist_files += custom_target(name + '.testlist',
- build_by_default : true,
- command : [testexe, '--show-testlist'],
- capture : true,
- output : name + '.testlist')
+ if not meson.is_cross_build()
+ testlist_files += custom_target(name + '.testlist',
+ build_by_default : true,
+ command : [testexe, '--show-testlist'],
+ capture : true,
+ output : name + '.testlist')
+ endif
endforeach
build_info += 'Xe **experimental** tests enabled.'
endif
@@ -435,11 +441,13 @@ if chamelium.found()
test_list += prog
test_executables += testexe
name = prog.split('/').get(-1)
- testlist_files += custom_target(name + '.testlist',
- build_by_default : true,
- command : [testexe, '--show-testlist'],
- capture : true,
- output : name + '.testlist')
+ if not meson.is_cross_build()
+ testlist_files += custom_target(name + '.testlist',
+ build_by_default : true,
+ command : [testexe, '--show-testlist'],
+ capture : true,
+ output : name + '.testlist')
+ endif
endforeach
test_deps += chamelium
@@ -452,11 +460,13 @@ if chamelium.found()
install : true)
test_list += name
test_executables += testexe
- testlist_files += custom_target(name + '.testlist',
- build_by_default : true,
- command : [testexe, '--show-testlist'],
- capture : true,
- output : name + '.testlist')
+ if not meson.is_cross_build()
+ testlist_files += custom_target(name + '.testlist',
+ build_by_default : true,
+ command : [testexe, '--show-testlist'],
+ capture : true,
+ output : name + '.testlist')
+ endif
endif
subdir('amdgpu')
@@ -468,11 +478,13 @@ subdir('vc4')
subdir('vmwgfx')
gen_testlist = find_program('generate_testlist.sh')
-test_list_target = custom_target('testlist',
- output : 'test-list.txt',
- command : [ gen_testlist, '@OUTPUT@', test_list ],
- install : true,
- install_dir : libexecdir)
+if not meson.is_cross_build()
+ test_list_target = custom_target('testlist',
+ output : 'test-list.txt',
+ command : [ gen_testlist, '@OUTPUT@', test_list ],
+ install : true,
+ install_dir : libexecdir)
+endif
test_executables += executable('gem_concurrent_all', 'i915/gem_concurrent_all.c',
dependencies : test_deps + [ libatomic ],
@@ -481,11 +493,13 @@ test_executables += executable('gem_concurrent_all', 'i915/gem_concurrent_all.c'
install : true)
test_list += 'gem_concurrent_all'
-test_list_full_target = custom_target('testlist-full',
- output : 'test-list-full.txt',
- command : [ gen_testlist, '@OUTPUT@', test_list ],
- install : true,
- install_dir : libexecdir)
+if not meson.is_cross_build()
+ test_list_full_target = custom_target('testlist-full',
+ output : 'test-list-full.txt',
+ command : [ gen_testlist, '@OUTPUT@', test_list ],
+ install : true,
+ install_dir : libexecdir)
+endif
test_script = find_program('igt_command_line.sh')
foreach prog : test_list
@@ -497,11 +511,13 @@ testexe = executable('gem_stress', 'i915/gem_stress.c',
install_dir : libexecdir,
install_rpath : libexecdir_rpathdir,
dependencies : igt_deps)
-testlist_files += custom_target('gem_stress.testlist',
- build_by_default : true,
- command : [testexe, '--show-testlist'],
- capture : true,
- output : 'gem_stress.testlist')
+if not meson.is_cross_build()
+ testlist_files += custom_target('gem_stress.testlist',
+ build_by_default : true,
+ command : [testexe, '--show-testlist'],
+ capture : true,
+ output : 'gem_stress.testlist')
+endif
image_files = [
'1080p-left.png',
--
2.41.0
next reply other threads:[~2023-08-31 11:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-31 11:44 Mauro Carvalho Chehab [this message]
2023-08-31 12:58 ` [igt-dev] ✗ GitLab.Pipeline: warning for tests/meson.build: only generate testlists on native builds (rev2) Patchwork
2023-08-31 13:33 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-08-31 14:24 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-08-31 17:49 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
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=20230831114454.460399-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