From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id 078B510E73D for ; Fri, 1 Sep 2023 07:42:37 +0000 (UTC) From: Mauro Carvalho Chehab To: igt-dev@lists.freedesktop.org Date: Fri, 1 Sep 2023 09:42:24 +0200 Message-ID: <20230901074224.524217-1-mauro.chehab@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH i-g-t] tests/meson.build: only generate testlists on native builds List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ilja Friedel Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: From: Mauro Carvalho Chehab 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 --- tests/meson.build | 72 +++++++++++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 30 deletions(-) diff --git a/tests/meson.build b/tests/meson.build index aa27fd9aff7c..aa8e3434ce0e 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -382,11 +382,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 intel_progs = intel_i915_xe_progs @@ -406,11 +408,13 @@ foreach prog : intel_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 : msm_progs @@ -433,11 +437,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 endif @@ -451,11 +457,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', 'intel/gem_concurrent_all.c', dependencies : test_deps + [ libatomic ], @@ -464,11 +472,13 @@ test_executables += executable('gem_concurrent_all', 'intel/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 @@ -480,11 +490,13 @@ testexe = executable('gem_stress', 'intel/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