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 1/2] meson: add an option to control Xe test builds
Date: Tue,  9 May 2023 09:34:25 +0200	[thread overview]
Message-ID: <20230509073426.1154390-2-mauro.chehab@linux.intel.com> (raw)
In-Reply-To: <20230509073426.1154390-1-mauro.chehab@linux.intel.com>

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

The Xe driver is currently under heavy development and has not
merged upstream yet. While merging doesn't happen, the API may
still change, as upstream may request changes on it and/or
driver developers may need to tweak some API bits.

While this is happening, incompatible API changes may still
happen. As IGT is distributed on some distros, placing Xe
tests on binaries is not a good idea, as such tests may fail
when the final version gets released.

So, add a build option to allow disabling Xe driver builds.

Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
 docs/testplan/meson.build |  9 ++++++++-
 meson_options.txt         |  9 +++++++++
 tests/meson.build         | 23 ++++++++++++++---------
 3 files changed, 31 insertions(+), 10 deletions(-)

diff --git a/docs/testplan/meson.build b/docs/testplan/meson.build
index b65ee964ddd2..2014f91b5be1 100644
--- a/docs/testplan/meson.build
+++ b/docs/testplan/meson.build
@@ -23,11 +23,18 @@ else
 	doc_dependencies = []
 endif
 
+xe_test_dict = {
+		 'xe_tests': { 'input': xe_test_config, 'extra_args': check_testlist }
+	       }
+
 test_dict = {
-	      'xe_tests': { 'input': xe_test_config, 'extra_args': check_testlist },
 	      'kms_tests': { 'input': kms_test_config, 'extra_args': [] }
 	    }
 
+if build_xe
+	test_dict += xe_test_dict
+endif
+
 foreach testplan, fields: test_dict
 	rst = custom_target(testplan + '.rst',
 			    build_by_default : true,
diff --git a/meson_options.txt b/meson_options.txt
index 2cb44f20169b..7b5a818cb72f 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -37,6 +37,15 @@ option('tests',
        type : 'feature',
        description : 'Build tests')
 
+# Currently, Xe uAPI is not stable: it may still change while the driver is
+# not merged upstream.
+# So, add an option to enable it, as distros shall not be shipping
+# binaries with Xe tests on it, as they will most certainly fail once
+# drivers get upstreamed.
+option('xe_driver',
+       type : 'feature',
+       description : 'Build tests for Xe driver (experimental)')
+
 option('libdrm_drivers',
        type : 'array',
        value : ['auto'],
diff --git a/tests/meson.build b/tests/meson.build
index c15eb3a08cb2..ff7c37304b4d 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -317,15 +317,20 @@ foreach prog : i915_progs
 	test_list += prog
 endforeach
 
-foreach prog : xe_progs
-	test_executables += executable(prog,
-		   join_paths('xe', prog + '.c'),
-		   dependencies : test_deps,
-		   install_dir : libexecdir,
-		   install_rpath : libexecdir_rpathdir,
-		   install : true)
-	test_list += prog
-endforeach
+build_xe = not get_option('xe_driver').disabled()
+
+if build_xe
+	foreach prog : xe_progs
+		test_executables += executable(prog,
+			   join_paths('xe', prog + '.c'),
+			   dependencies : test_deps,
+			   install_dir : libexecdir,
+			   install_rpath : libexecdir_rpathdir,
+			   install : true)
+		test_list += prog
+	endforeach
+	build_info += 'Xe **experimental** tests enabled.'
+endif
 
 foreach prog : msm_progs
 	test_executables += executable(prog, join_paths('msm', prog + '.c'),
-- 
2.40.1

  reply	other threads:[~2023-05-09  7:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-09  7:34 [igt-dev] [PATCH i-g-t 0/2] Add an option to protect Xe test builds Mauro Carvalho Chehab
2023-05-09  7:34 ` Mauro Carvalho Chehab [this message]
2023-05-09 15:13   ` [igt-dev] [PATCH i-g-t 1/2] meson: add an option to control " Rodrigo Vivi
2023-05-09  7:34 ` [igt-dev] [PATCH i-g-t 2/2] meson_options.txt: disable Xe driver tests by default Mauro Carvalho Chehab
2023-05-09  7:48 ` [igt-dev] ✗ GitLab.Pipeline: warning for Add an option to protect Xe test builds Patchwork
2023-05-09  8:25 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-05-09 13:01 ` [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=20230509073426.1154390-2-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