Skip to contentSkip to conversation

autotools: Check target requires to a have the list of tests built.

PATCH In review Marius Vlad 2 participants 3 messages Apr 29, 2016 – Aug 24, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 autotools: Check target requires to a have the list of tests built.

We need to have the test list generated before running the check target. Migrated igt_command_line.sh to tests/ from lib/tests/, which allows to building the tests and execute the script.

This would allow cleaning followed by a make check.

---
 lib/tests/Makefile.am         |  1 -
 lib/tests/Makefile.sources    |  3 --
 lib/tests/igt_command_line.sh | 76 -------------------------------------------
 tests/Makefile.am             |  2 +-
 tests/Makefile.sources        |  8 +++++
 tests/igt_command_line.sh     | 74 +++++++++++++++++++++++++++++++++++++++++
 6 files changed, 83 insertions(+), 81 deletions(-)
 delete mode 100755 lib/tests/igt_command_line.sh
 create mode 100755 tests/igt_command_line.sh
lib/tests/Makefile.am +0 -1
index 582cc3e..99ab724 100644
@@ -4,7 +4,6 @@ AM_TESTS_ENVIRONMENT = \
 	top_builddir=$(top_builddir) \
 	top_srcdir=$(top_srcdir)
 
-EXTRA_DIST = $(check_SCRIPTS)
 
 AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) $(DEBUG_CFLAGS) \
 	-I$(srcdir)/../.. \
lib/tests/Makefile.sources +0 -3
index 707c445..37126f1 100644
@@ -15,9 +15,6 @@ check_PROGRAMS = \
 	igt_exit_handler \
 	$(NULL)
 
-check_SCRIPTS = \
-	igt_command_line.sh \
-	$(NULL)
 
 TESTS = \
 	$(check_PROGRAMS) \
lib/tests/igt_command_line.sh deleted +0 -76

76 lines not on this page · raw message

tests/Makefile.am +1 -1
index 45e3359..79a7324 100644
@@ -49,7 +49,7 @@ all-local: .gitignore
 pkgdata_DATA = test-list.txt test-list-full.txt
 
 EXTRA_PROGRAMS = $(HANG)
-EXTRA_DIST = $(common_files)
+EXTRA_DIST = $(common_files) $(check_SCRIPTS)
 
 CLEANFILES = $(EXTRA_PROGRAMS) test-list.txt test-list-full.txt .gitignore
 
tests/Makefile.sources +8 -0
index b73f48d..28e8695 100644
@@ -287,6 +287,14 @@ testdisplay_SOURCES = \
 
 TESTS_progs += testdisplay
 
+check_SCRIPTS = \
+		igt_command_line.sh \
+		$(NULL)
+
+TESTS = \
+	$(check_SCRIPTS) \
+	$(NULL)
+
 common_files = \
 	       eviction_common.c \
 	       $(NULL)
tests/igt_command_line.sh new file +74 -0

74 lines not on this page · raw message

Signature · 6 lines
2.8.0.rc3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 2/2 autotools, assembler: Fix check target for tests in assembler.

assembler suffers from the same issue as lib/tests, adjust it so it allows us to do a check. Have to make autotools happy by having an empty Makefile.am.

---
 assembler/Makefile.am      | 108 ++++++++++++++++++++++++++++++++++++++++++++-
 assembler/test/Makefile.am |  93 --------------------------------------
 assembler/test/run-test.sh |   2 +-
 3 files changed, 107 insertions(+), 96 deletions(-)
assembler/Makefile.am +106 -2
index fb309ac..bed6c07 100644
@@ -47,8 +47,112 @@ intel_gen4disasm_LDADD = libbrw.la
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = intel-gen4asm.pc
 
-CLEANFILES = $(BUILT_SOURCES)
+check_SCRIPTS = test/run-test.sh
+
+TESTS = \
+	test/mov \
+	test/frc \
+	test/rndd \
+	test/rndu \
+	test/rnde \
+	test/rnde-intsrc \
+	test/rndz \
+	test/lzd \
+	test/not \
+	test/immediate \
+	$(NULL)
+
+# Tests that are expected to fail because they contain some inccorect code.
+XFAIL_TESTS =
+
+# Those tests were already failing when the assembler was imported from
+# the intel-gen4asm git repository:
+#   http://cgit.freedesktop.org/xorg/app/intel-gen4asm/
+# We disable them "for now" as a workaround to be able to release i-g-t
+disabled_tests = \
+	test/declare \
+	test/jmpi \
+	test/if \
+	test/iff \
+	test/while \
+	test/else \
+	test/break \
+	test/cont \
+	test/halt \
+	test/wait \
+	test/endif \
+	$(NULL)
+
+disabled_xfail_tests = \
+	test/rnde-intsrc \
+	$(NULL)
+
+TESTDATA = \
+	test/mov.expected \
+	test/mov.g4a \
+	test/frc.expected \
+	test/frc.g4a \
+	test/rndd.expected \
+	test/rndd.g4a \
+	test/rndu.expected \
+	test/rndu.g4a \
+	test/rnde.expected \
+	test/rnde.g4a \
+	test/rnde-intsrc.expected \
+	test/rnde-intsrc.g4a \
+	test/rndz.expected \
+	test/rndz.g4a \
+	test/lzd.expected \
+	test/lzd.g4a \
+	test/not.expected \
+	test/not.g4a \
+	test/jmpi.expected \
+	test/jmpi.g4a \
+	test/if.expected \
+	test/if.g4a \
+	test/iff.expected \
+	test/iff.g4a \
+	test/while.expected \
+	test/while.g4a \
+	test/else.expected \
+	test/else.g4a \
+	test/break.expected \
+	test/break.g4a \
+	test/cont.expected \
+	test/cont.g4a \
+	test/halt.expected \
+	test/halt.g4a \
+	test/wait.expected \
+	test/wait.g4a \
+	test/endif.expected \
+	test/endif.g4a \
+	test/declare.expected \
+	test/declare.g4a \
+	test/immediate.g4a \
+	test/immediate.expected \
+	$(NULL)
+
+test_EXTRA_DIST = \
+	${TESTDATA} \
+	test/run-test.sh \
+	$(NULL)
+
+$(TESTS): test/run-test.sh
+	sed "s|TEST|$@|g" ${srcdir}/test/run-test.sh > $@
+	chmod +x $@
+
+test_CLEANFILES = \
+	test/*.out \
+	${TESTS} \
+	$(NULL)
+
+CLEANFILES = $(BUILT_SOURCES) \
+	     $(test_CLEANFILES) \
+	     $(NULL)
+
 EXTRA_DIST = \
 	README \
 	TODO \
-	intel-gen4asm.pc.in
+	intel-gen4asm.pc.in \
+	$(test_EXTRA_DIST) \
+	$(NULL)
assembler/test/Makefile.am +0 -93

93 lines not on this page · raw message

assembler/test/run-test.sh +1 -1
index 27c5c2d..20a408c 100644
@@ -3,7 +3,7 @@
 SRCDIR=${srcdir-`pwd`}
 BUILDDIR=${top_builddir-`pwd`}
 
-${BUILDDIR}/assembler/intel-gen4asm -o TEST.out $SRCDIR/TEST.g4a
+${BUILDDIR}/intel-gen4asm -o TEST.out $SRCDIR/TEST.g4a
 if cmp TEST.out ${SRCDIR}/TEST.expected 2> /dev/null; then : ; else
   echo "Output comparison for TEST"
   diff -u ${SRCDIR}/TEST.expected TEST.out
Signature · 6 lines
2.8.0.rc3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/2
#2 lore raw
In reply to Marius Vlad
Quoted 7 lines · Marius Vlad

We need to have the test list generated before running the check target. Migrated igt_command_line.sh to tests/ from lib/tests/, which allows to building the tests and execute the script.

This would allow cleaning followed by a make check.

I stumbled across this make check failure, and this looks like the fix.

-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx