浏览代码

package/igt-gpu-tools: add option to enable tests

Leave IGT tests disabled by default but allow users to build them with a
new Kconfig option. Those tests are helpful to sanity check GPUs on a
system.

Signed-off-by: Francois Dugast <francois.dugast@intel.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Francois Dugast 6 月之前
父节点
当前提交
ea8dcb2288
共有 2 个文件被更改,包括 17 次插入2 次删除
  1. 10 0
      package/igt-gpu-tools/Config.in
  2. 7 2
      package/igt-gpu-tools/igt-gpu-tools.mk

+ 10 - 0
package/igt-gpu-tools/Config.in

@@ -24,6 +24,16 @@ config BR2_PACKAGE_IGT_GPU_TOOLS
 
 	  https://gitlab.freedesktop.org/drm/igt-gpu-tools
 
+if BR2_PACKAGE_IGT_GPU_TOOLS
+
+config BR2_PACKAGE_IGT_GPU_TOOLS_TESTS
+	bool "enable tests"
+	help
+	  Enable IGT tests, resulting in individual executables
+	  for GPU testing under /usr/libexec/igt-gpu-tools.
+
+endif
+
 comment "igt-gpu-tools needs udev /dev management and toolchain w/ NPTL, wchar, dynamic library, locale, headers >= 4.11"
 	depends on BR2_USE_MMU
 	depends on !BR2_PACKAGE_HAS_UDEV || BR2_STATIC_LIBS || \

+ 7 - 2
package/igt-gpu-tools/igt-gpu-tools.mk

@@ -24,8 +24,13 @@ IGT_GPU_TOOLS_DEPENDENCIES = \
 	zlib
 
 IGT_GPU_TOOLS_CONF_OPTS = \
-	-Dchamelium=disabled \
-	-Dtests=disabled
+	-Dchamelium=disabled
+
+ifeq ($(BR2_PACKAGE_IGT_GPU_TOOLS_TESTS),y)
+IGT_GPU_TOOLS_CONF_OPTS += -Dtests=enabled
+else
+IGT_GPU_TOOLS_CONF_OPTS += -Dtests=disabled
+endif
 
 # On x86 systems, libigt resolves igt_half_to_float and igt_float_to_half as
 # indirect functions at runtime by checking CPU features with igt_x86_features.