From 685e57736a2c5da2e955ffd2f0027e4b42e397f7 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Mon, 27 Oct 2014 15:08:50 +0100 Subject: [PATCH] Move library selftests to lib/tests Again they're not really igt testcases so are in the way of running spatch unconditionally. Move them someplace else. Signed-off-by: Daniel Vetter --- configure.ac | 1 + lib/Makefile.am | 2 ++ lib/tests/.gitignore | 7 +++++ lib/tests/Makefile.am | 18 ++++++++++++ lib/tests/Makefile.sources | 29 ++++++++++++++++++++ {tests => lib/tests}/igt_command_line.sh | 0 {tests => lib/tests}/igt_fork_helper.c | 0 {tests => lib/tests}/igt_list_only.c | 0 {tests => lib/tests}/igt_no_exit.c | 0 {tests => lib/tests}/igt_no_exit_list_only.c | 0 {tests => lib/tests}/igt_no_subtest.c | 0 {tests => lib/tests}/igt_simulation.c | 0 tests/.gitignore | 6 ---- tests/Makefile.am | 4 +-- tests/Makefile.sources | 18 ------------ 15 files changed, 59 insertions(+), 26 deletions(-) create mode 100644 lib/tests/.gitignore create mode 100644 lib/tests/Makefile.am create mode 100644 lib/tests/Makefile.sources rename {tests => lib/tests}/igt_command_line.sh (100%) rename {tests => lib/tests}/igt_fork_helper.c (100%) rename {tests => lib/tests}/igt_list_only.c (100%) rename {tests => lib/tests}/igt_no_exit.c (100%) rename {tests => lib/tests}/igt_no_exit_list_only.c (100%) rename {tests => lib/tests}/igt_no_subtest.c (100%) rename {tests => lib/tests}/igt_simulation.c (100%) diff --git a/configure.ac b/configure.ac index 03e856dd..d3faa19a 100644 --- a/configure.ac +++ b/configure.ac @@ -216,6 +216,7 @@ AC_CONFIG_FILES([ docs/reference/intel-gpu-tools/Makefile docs/reference/intel-gpu-tools/version.xml lib/Makefile + lib/tests/Makefile man/Makefile scripts/Makefile tests/Makefile diff --git a/lib/Makefile.am b/lib/Makefile.am index 36cf2d3f..6b1e984c 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,6 +1,8 @@ IGT_LIB_PATH := $(builddir) GPU_TOOLS_PATH := $(top_srcdir) +SUBDIRS = tests + include Makefile.sources noinst_LTLIBRARIES = libintel_tools.la diff --git a/lib/tests/.gitignore b/lib/tests/.gitignore new file mode 100644 index 00000000..caf53482 --- /dev/null +++ b/lib/tests/.gitignore @@ -0,0 +1,7 @@ +# Please keep sorted alphabetically +igt_fork_helper +igt_list_only +igt_no_exit +igt_no_exit_list_only +igt_no_subtest +igt_simulation diff --git a/lib/tests/Makefile.am b/lib/tests/Makefile.am new file mode 100644 index 00000000..808d31f2 --- /dev/null +++ b/lib/tests/Makefile.am @@ -0,0 +1,18 @@ +include Makefile.sources + +EXTRA_PROGRAMS = $(TESTS_testsuite) +EXTRA_DIST = $(TESTS_scripts) + +CLEANFILES = $(EXTRA_PROGRAMS) + +AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) \ + -I$(srcdir)/../.. \ + -I$(srcdir)/.. \ + -include "$(srcdir)/../../lib/check-ndebug.h" \ + -DIGT_DATADIR=\""$(abs_srcdir)"\" \ + $(NULL) + +LDADD = ../libintel_tools.la $(PCIACCESS_LIBS) $(DRM_LIBS) + +LDADD += $(CAIRO_LIBS) $(LIBUDEV_LIBS) $(GLIB_LIBS) +AM_CFLAGS += $(CAIRO_CFLAGS) $(LIBUDEV_CFLAGS) $(GLIB_CFLAGS) diff --git a/lib/tests/Makefile.sources b/lib/tests/Makefile.sources new file mode 100644 index 00000000..b13314de --- /dev/null +++ b/lib/tests/Makefile.sources @@ -0,0 +1,29 @@ +noinst_PROGRAMS = \ + $(TESTS_testsuite) \ + $(NULL) + +TESTS_testsuite = \ + igt_no_exit \ + igt_no_exit_list_only \ + igt_fork_helper \ + igt_list_only \ + igt_no_subtest \ + igt_simulation \ + $(NULL) + +TESTS_testsuite_scripts = \ + igt_command_line.sh \ + $(NULL) + +TESTS = \ + $(TESTS_testsuite) \ + $(TESTS_testsuite_scripts) \ + $(NULL) + +# Test that exercise specific asserts in the test framework library and are +# hence expected to fail. +XFAIL_TESTS = \ + igt_no_exit \ + igt_no_exit_list_only \ + igt_no_subtest \ + $(NULL) diff --git a/tests/igt_command_line.sh b/lib/tests/igt_command_line.sh similarity index 100% rename from tests/igt_command_line.sh rename to lib/tests/igt_command_line.sh diff --git a/tests/igt_fork_helper.c b/lib/tests/igt_fork_helper.c similarity index 100% rename from tests/igt_fork_helper.c rename to lib/tests/igt_fork_helper.c diff --git a/tests/igt_list_only.c b/lib/tests/igt_list_only.c similarity index 100% rename from tests/igt_list_only.c rename to lib/tests/igt_list_only.c diff --git a/tests/igt_no_exit.c b/lib/tests/igt_no_exit.c similarity index 100% rename from tests/igt_no_exit.c rename to lib/tests/igt_no_exit.c diff --git a/tests/igt_no_exit_list_only.c b/lib/tests/igt_no_exit_list_only.c similarity index 100% rename from tests/igt_no_exit_list_only.c rename to lib/tests/igt_no_exit_list_only.c diff --git a/tests/igt_no_subtest.c b/lib/tests/igt_no_subtest.c similarity index 100% rename from tests/igt_no_subtest.c rename to lib/tests/igt_no_subtest.c diff --git a/tests/igt_simulation.c b/lib/tests/igt_simulation.c similarity index 100% rename from tests/igt_simulation.c rename to lib/tests/igt_simulation.c diff --git a/tests/.gitignore b/tests/.gitignore index b8562b62..da8b4170 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -112,12 +112,6 @@ gen3_render_mixed_blits gen3_render_tiledx_blits gen3_render_tiledy_blits gen7_forcewake_mt -igt_fork_helper -igt_list_only -igt_no_exit -igt_no_exit_list_only -igt_no_subtest -igt_simulation kms_3d kms_addfb kms_cursor_crc diff --git a/tests/Makefile.am b/tests/Makefile.am index 5734002a..889333be 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -27,8 +27,8 @@ multi-tests.txt: Makefile.sources @echo ${multi_kernel_tests} >> $@ @echo END TESTLIST >> $@ -EXTRA_PROGRAMS = $(TESTS_progs) $(TESTS_progs_M) $(HANG) $(TESTS_testsuite) -EXTRA_DIST = $(TESTS_scripts) $(TESTS_scripts_M) $(scripts) $(IMAGES) $(common_files) +EXTRA_PROGRAMS = $(TESTS_progs) $(TESTS_progs_M) $(HANG) +EXTRA_DIST = $(TESTS_scripts_M) $(scripts) $(IMAGES) $(common_files) CLEANFILES = $(EXTRA_PROGRAMS) single-tests.txt multi-tests.txt diff --git a/tests/Makefile.sources b/tests/Makefile.sources index 7724a734..ec350047 100644 --- a/tests/Makefile.sources +++ b/tests/Makefile.sources @@ -191,24 +191,6 @@ kernel_tests = \ $(multi_kernel_tests) \ $(NULL) -TESTS_testsuite = \ - igt_no_exit \ - igt_no_exit_list_only \ - igt_fork_helper \ - igt_list_only \ - igt_no_subtest \ - igt_simulation \ - $(NULL) - -TESTS_testsuite_scripts = \ - igt_command_line.sh \ - $(NULL) - -TESTS = \ - $(TESTS_testsuite) \ - $(TESTS_testsuite_scripts) \ - $(NULL) - # Test that exercise specific asserts in the test framework library and are # hence expected to fail. XFAIL_TESTS = \