Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Petri Latvala <petri.latvala@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t 1/4] tests: Add a hw-tests subdirectory
Date: Wed, 13 Dec 2017 14:58:13 +0200	[thread overview]
Message-ID: <20171213125816.18371-2-petri.latvala@intel.com> (raw)
In-Reply-To: <20171213125816.18371-1-petri.latvala@intel.com>

The hw-tests subdirectory is meant for tests that target the
hardware's behaviour without the kernel having much say in
matters. Tests in the directory are not meant for regular CI runs, and
running them requires setting IGT_TEST_ROOT to that directory when
using piglit.

Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
---
 configure.ac                    | 12 ++++++++++++
 tests/Makefile.am               |  2 +-
 tests/hw-tests/Makefile.am      | 41 +++++++++++++++++++++++++++++++++++++++++
 tests/hw-tests/Makefile.sources |  2 ++
 tests/hw-tests/meson.build      | 24 ++++++++++++++++++++++++
 tests/meson.build               |  2 ++
 6 files changed, 82 insertions(+), 1 deletion(-)
 create mode 100644 tests/hw-tests/Makefile.am
 create mode 100644 tests/hw-tests/Makefile.sources
 create mode 100644 tests/hw-tests/meson.build

diff --git a/configure.ac b/configure.ac
index 8740f7a4..5c48025b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -374,6 +374,16 @@ if test "x$BUILD_TESTS" = xyes; then
 	AC_DEFINE(BUILD_TESTS, 1, [Build tests])
 fi
 AM_CONDITIONAL(BUILD_TESTS, [test "x$BUILD_TESTS" = xyes])
+
+AC_ARG_ENABLE(hw_tests,
+             AS_HELP_STRING([--disable-hw-tests],
+             [Disable HW tests build (default: enabled)]),
+             [BUILD_HW_TESTS=$enableval], [BUILD_HW_TESTS="yes"])
+if test "x$BUILD_TESTS" = xyes; then
+       AC_DEFINE(BUILD_HW_TESTS, 1, [Build hw tests])
+fi
+AM_CONDITIONAL(BUILD_HW_TESTS, [test "x$BUILD_HW_TESTS" = xyes])
+
 AC_DEFINE_UNQUOTED(TARGET_CPU_PLATFORM, ["$host_cpu"], [Target platform])
 
 files="broadwell cherryview haswell ivybridge sandybridge valleyview skylake"
@@ -397,6 +407,7 @@ AC_CONFIG_FILES([
 		 man/Makefile
 		 scripts/Makefile
 		 tests/Makefile
+		 tests/hw-tests/Makefile
 		 tests/intel-ci/Makefile
 		 tools/Makefile
 		 tools/null_state_gen/Makefile
@@ -423,6 +434,7 @@ echo "Intel GPU tools"
 echo ""
 echo " • Tests:"
 echo "       Build tests        : ${BUILD_TESTS}"
+echo "       Build HW tests     : ${BUILD_HW_TESTS}"
 echo "       Chamelium tests    : ${enable_chamelium}"
 echo "       Audio tests        : ${enable_audio}"
 echo "       Compile prime tests: ${NOUVEAU}"
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1b9a7b0a..18479722 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,6 +1,6 @@
 include Makefile.sources
 
-SUBDIRS = intel-ci
+SUBDIRS = hw-tests intel-ci
 
 if HAVE_LIBDRM_AMDGPU
     TESTS_progs += $(AMDGPU_TESTS)
diff --git a/tests/hw-tests/Makefile.am b/tests/hw-tests/Makefile.am
new file mode 100644
index 00000000..434ff695
--- /dev/null
+++ b/tests/hw-tests/Makefile.am
@@ -0,0 +1,41 @@
+include Makefile.sources
+
+if BUILD_HW_TESTS
+test-list.txt: Makefile
+	@echo TESTLIST > $@
+	@echo ${hw_tests} >> $@
+	@echo END TESTLIST >> $@
+
+hwtests_libexecdir = $(pkglibexecdir)/hw-tests
+hwtests_libexec_DATA = \
+	test-list.txt \
+	$(NULL)
+hwtests_libexec_PROGRAMS = $(hw_tests)
+
+all-local: .gitignore
+.gitignore: Makefile.sources
+	@echo "$(hw_tests) test-list.txt /.gitignore" | sed 's/\s\+/\n/g' | sort > $@
+
+EXTRA_DIST = \
+	meson.build \
+	$(NULL)
+
+CLEANFILES = test-list.txt .gitignore
+
+AM_CFLAGS = $(CWARNFLAGS) -Wno-unused-result $(DEBUG_CFLAGS)\
+	-I$(top_srcdir)/include/drm-uapi \
+	-I$(srcdir)/.. \
+	-I$(top_srcdir)/lib \
+	-include "$(srcdir)/../lib/check-ndebug.h" \
+	-DIGT_SRCDIR=\""$(abs_srcdir)"\" \
+	-DIGT_DATADIR=\""$(pkgdatadir)"\" \
+	-D_GNU_SOURCE \
+	$(DRM_CFLAGS) $(LIBUNWIND_CFLAGS) $(WERROR_CFLAGS) \
+	$(NULL)
+
+LDADD = ../../lib/libintel_tools.la $(XMLRPC_LIBS)
+
+AM_CFLAGS += $(CAIRO_CFLAGS) $(LIBUDEV_CFLAGS)
+AM_LDFLAGS = -Wl,--as-needed
+
+endif
diff --git a/tests/hw-tests/Makefile.sources b/tests/hw-tests/Makefile.sources
new file mode 100644
index 00000000..a224da7c
--- /dev/null
+++ b/tests/hw-tests/Makefile.sources
@@ -0,0 +1,2 @@
+hw_tests = \
+	 $(NULL)
diff --git a/tests/hw-tests/meson.build b/tests/hw-tests/meson.build
new file mode 100644
index 00000000..32bb637d
--- /dev/null
+++ b/tests/hw-tests/meson.build
@@ -0,0 +1,24 @@
+hw_test_progs = [
+]
+
+hw_test_deps = [ igt_deps ]
+
+# TODO: Refactoring of all such paths
+hw_libexecdir = join_paths(get_option('libexecdir'), 'intel-gpu-tools', 'hw-tests')
+
+hw_test_executables = []
+
+foreach prog : hw_test_progs
+	hw_test_executables += executable(prog, prog + '.c',
+		   dependencies : test_deps,
+		   install_dir : hw_libexecdir,
+		   install : true)
+endforeach
+
+hw_pkgdatadir = join_paths(get_option('datadir'), 'intel-gpu-tools', 'hw-tests')
+
+hw_test_list = custom_target('hw_testlist',
+	      output : 'test-list.txt',
+	      command : [ gen_testlist, '@OUTPUT@', hw_test_progs ],
+	      install : true,
+	      install_dir : hw_pkgdatadir)
diff --git a/tests/meson.build b/tests/meson.build
index 191ac4ce..8ab16a70 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -316,3 +316,5 @@ image_files = [
   'pass.png',
 ]
 install_data(sources : image_files, install_dir : pkgdatadir)
+
+subdir('hw-tests')
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-12-13 12:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-13 12:58 [PATCH i-g-t 0/4] Create a new directory for hardware-targeting tests Petri Latvala
2017-12-13 12:58 ` Petri Latvala [this message]
2017-12-13 12:58 ` [PATCH i-g-t 2/4] tests: Move gem_bad_address to hw-tests Petri Latvala
2017-12-13 13:26   ` Chris Wilson
2017-12-15 19:43     ` Antonio Argenziano
2017-12-13 12:58 ` [PATCH i-g-t 3/4] hw-tests: Fix and update gem_bad_address Petri Latvala
2017-12-15 20:46   ` Chris Wilson
2017-12-13 12:58 ` [PATCH i-g-t 4/4] run-tests.sh: Allow users to override IGT_TEST_ROOT Petri Latvala
2017-12-13 16:04   ` Arkadiusz Hiler
2017-12-13 16:41 ` ✓ Fi.CI.BAT: success for Create a new directory for hardware-targeting tests Patchwork
2017-12-13 18:31 ` ✓ 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=20171213125816.18371-2-petri.latvala@intel.com \
    --to=petri.latvala@intel.com \
    --cc=intel-gfx@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