Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: Ilja Friedel <ihf@google.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t v5 4/7] tests/meson.build: create testlists for tests
Date: Thu, 31 Aug 2023 11:28:51 +0200	[thread overview]
Message-ID: <20230831112851.2b5c19b7@maurocar-mobl2> (raw)
In-Reply-To: <CAAea8Y3a_RjknGcn6-v9CVUVpcmMuASnJKfn73KGtQzbXo0TcA@mail.gmail.com>

On Wed, 30 Aug 2023 14:49:10 -0700
Ilja Friedel <ihf@google.com> wrote:

> Hi Mauro,
> 
> on ChromeOS we are cross-compiling binaries inside of portage/gentoo
> servers for consumer devices. Which means these servers are typically
> unable to execute the binaries. (For instance on Intel and AMD they will
> try to load libdrm_intel.so/libdrm_amdgpu.so even though the servers don't
> have a GPU and don't need these libraries). Hence we have testplan disabled
> while building on the server. (We run the test binaries later on the
> devices.) Now this change reintroduces executing the compiled binaries on
> the server just when building them, for a testplan phase that will never
> happen on the server. Would it be possible to place the equivalent of "if
> testplan" around this code?
> 
> As an aside, we don't run into problems compiling for Qualcomm/ARM. I am
> unclear why, as I don't see qemu or similar running. So maybe there already
> is a way to disable this?

Please don't top post. It makes harder to add comments at the right
order :-)

> 
> Thank you,
> 
> Ilja.
> 
> On Wed, Aug 30, 2023 at 2:41 PM Mark Yacoub <markyacoub@chromium.org> wrote:
> 
> > This is causing issues for IGT ChromeOS. Adding +ihf@google.com for
> > more context.

The testlist files are used for two purposes:

1. for documentation build;
2. for CI automation to run the tests.

While right now Intel CI doesn't depend on the produced testlists,
this may change in the future. So, instead of making the testlist
build dependent of testplan, the better seems to verify if the
build is not a cross-compilation, e. g. with a patch similar to
the enclosed one.

Could you please check if this will address the issue? I don't have
a cross-compilation environment handy to test it, so it would be
easier if you could test it for me.

Regards,
Mauro

---

[PATCH i-g-t] tests/meson.build: only generate testlists on native builds

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>

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',

  parent reply	other threads:[~2023-08-31  9:28 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-10 11:53 [igt-dev] [PATCH i-g-t v5 0/7] Speedup IGT build time Mauro Carvalho Chehab
2023-07-10 11:53 ` [igt-dev] [PATCH i-g-t v5 1/7] tests/meson.build: Simplify builds for core and i915 targets Mauro Carvalho Chehab
2023-07-10 17:51   ` Kamil Konieczny
2023-07-10 11:53 ` [igt-dev] [PATCH i-g-t v5 2/7] lib/igt_core: use the macro when checking for list_subtests Mauro Carvalho Chehab
2023-07-10 17:58   ` Kamil Konieczny
2023-07-10 11:53 ` [igt-dev] [PATCH i-g-t v5 3/7] lib/igt_core: add an option to show the testlist Mauro Carvalho Chehab
2023-07-10 18:11   ` Kamil Konieczny
2023-07-10 11:53 ` [igt-dev] [PATCH i-g-t v5 4/7] tests/meson.build: create testlists for tests Mauro Carvalho Chehab
2023-07-10 18:17   ` Kamil Konieczny
2023-08-30 21:41     ` Mark Yacoub
     [not found]       ` <CAAea8Y3a_RjknGcn6-v9CVUVpcmMuASnJKfn73KGtQzbXo0TcA@mail.gmail.com>
2023-08-31  9:28         ` Mauro Carvalho Chehab [this message]
     [not found]           ` <CAAea8Y13=CguTipLJjJJt_pBvaiv92DViWJBZwvtjm7W-SU+vw@mail.gmail.com>
2023-09-01  7:45             ` Mauro Carvalho Chehab
2023-09-01  8:34               ` Mauro Carvalho Chehab
2023-09-01 11:01               ` Mauro Carvalho Chehab
     [not found]               ` <CAAea8Y2hX2=TjXmGJN=tFBSgFPqe8J5EgDCkoR7OMVy+J2t+cA@mail.gmail.com>
2023-09-04  6:53                 ` Mauro Carvalho Chehab
2023-07-10 11:53 ` [igt-dev] [PATCH i-g-t v5 5/7] scripts/test_list.py: speedup testlist check logic Mauro Carvalho Chehab
2023-07-10 18:23   ` Kamil Konieczny
2023-07-10 11:53 ` [igt-dev] [PATCH i-g-t v5 6/7] tests/build: Generate and store an intel-ci.testlist Mauro Carvalho Chehab
2023-07-10 18:26   ` Kamil Konieczny
2023-07-10 11:53 ` [igt-dev] [PATCH i-g-t v5 7/7] scripts/test_list.py: optimize check regex Mauro Carvalho Chehab
2023-07-10 18:27   ` Kamil Konieczny
2023-07-10 13:50 ` [igt-dev] ✓ Fi.CI.BAT: success for Speedup IGT build time Patchwork
2023-07-10 14:00 ` [igt-dev] ○ CI.xeBAT: info " Patchwork
2023-07-10 17:02 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-08-31 11:36 ` [igt-dev] ✗ Fi.CI.BUILD: failure for Speedup IGT build time (rev2) 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=20230831112851.2b5c19b7@maurocar-mobl2 \
    --to=mauro.chehab@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=ihf@google.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