From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2C0F910E37B for ; Tue, 9 May 2023 10:42:08 +0000 (UTC) Received: from linux.intel.com (maurocar-mobl2.ger.corp.intel.com [10.252.18.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id CAC7C580D92 for ; Tue, 9 May 2023 03:42:06 -0700 (PDT) Received: from maurocar by linux.intel.com with local (Exim 4.96) (envelope-from ) id 1pwKnE-004su8-19 for igt-dev@lists.freedesktop.org; Tue, 09 May 2023 12:42:04 +0200 From: Mauro Carvalho Chehab To: igt-dev@lists.freedesktop.org Date: Tue, 9 May 2023 12:42:02 +0200 Message-Id: <20230509104203.1163545-2-mauro.chehab@linux.intel.com> In-Reply-To: <20230509104203.1163545-1-mauro.chehab@linux.intel.com> References: <20230509104203.1163545-1-mauro.chehab@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH i-g-t v2 1/2] meson: add an option to control Xe test builds List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: From: Mauro Carvalho Chehab 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 --- docs/testplan/meson.build | 9 ++++++++- meson.build | 1 + meson_options.txt | 9 +++++++++ tests/meson.build | 21 ++++++++++++--------- 4 files changed, 30 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.build b/meson.build index 0362178444ee..1c872cc9cb02 100644 --- a/meson.build +++ b/meson.build @@ -85,6 +85,7 @@ endforeach build_chamelium = get_option('chamelium') build_docs = get_option('docs') build_tests = not get_option('tests').disabled() +build_xe = not get_option('xe_driver').disabled() with_libdrm = get_option('libdrm_drivers') build_info = ['Build type: ' + get_option('buildtype')] 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..38f080f7c26e 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -317,15 +317,18 @@ 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 +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