From patchwork Fri Apr 29 13:11:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Vlad X-Patchwork-Id: 8981971 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AB035BF29F for ; Fri, 29 Apr 2016 13:08:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 88795201DD for ; Fri, 29 Apr 2016 13:08:20 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 69D5D201C0 for ; Fri, 29 Apr 2016 13:08:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 758426EF21; Fri, 29 Apr 2016 13:08:17 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTP id 8C4866EF37 for ; Fri, 29 Apr 2016 13:08:14 +0000 (UTC) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 29 Apr 2016 06:08:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,551,1455004800"; d="scan'208";a="694292147" Received: from mcvlad-wk.rb.intel.com ([10.237.105.57]) by FMSMGA003.fm.intel.com with ESMTP; 29 Apr 2016 06:08:13 -0700 From: Marius Vlad To: intel-gfx@lists.freedesktop.org Date: Fri, 29 Apr 2016 16:11:20 +0300 Message-Id: <1461935480-31688-2-git-send-email-marius.c.vlad@intel.com> X-Mailer: git-send-email 2.8.0.rc3 In-Reply-To: <1461935480-31688-1-git-send-email-marius.c.vlad@intel.com> References: <1461935480-31688-1-git-send-email-marius.c.vlad@intel.com> Subject: [Intel-gfx] [PATCH i-g-t 2/2] autotools, assembler: Fix check target for tests in assembler. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Signed-off-by: Marius Vlad --- assembler/Makefile.am | 108 ++++++++++++++++++++++++++++++++++++++++++++- assembler/test/Makefile.am | 93 -------------------------------------- assembler/test/run-test.sh | 2 +- 3 files changed, 107 insertions(+), 96 deletions(-) diff --git a/assembler/Makefile.am b/assembler/Makefile.am index fb309ac..bed6c07 100644 --- a/assembler/Makefile.am +++ b/assembler/Makefile.am @@ -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) diff --git a/assembler/test/Makefile.am b/assembler/test/Makefile.am index f113119..e69de29 100644 --- a/assembler/test/Makefile.am +++ b/assembler/test/Makefile.am @@ -1,93 +0,0 @@ -check_SCRIPTS = run-test.sh - -TESTS_ENVIRONMENT = top_builddir=${top_builddir} -TESTS = \ - mov \ - frc \ - rndd \ - rndu \ - rnde \ - rnde-intsrc \ - rndz \ - lzd \ - not \ - immediate - -# 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 = \ - declare \ - jmpi \ - if \ - iff \ - while \ - else \ - break \ - cont \ - halt \ - wait \ - endif - -disabled_xfail_tests = \ - rnde-intsrc - -TESTDATA = \ - mov.expected \ - mov.g4a \ - frc.expected \ - frc.g4a \ - rndd.expected \ - rndd.g4a \ - rndu.expected \ - rndu.g4a \ - rnde.expected \ - rnde.g4a \ - rnde-intsrc.expected \ - rnde-intsrc.g4a \ - rndz.expected \ - rndz.g4a \ - lzd.expected \ - lzd.g4a \ - not.expected \ - not.g4a \ - jmpi.expected \ - jmpi.g4a \ - if.expected \ - if.g4a \ - iff.expected \ - iff.g4a \ - while.expected \ - while.g4a \ - else.expected \ - else.g4a \ - break.expected \ - break.g4a \ - cont.expected \ - cont.g4a \ - halt.expected \ - halt.g4a \ - wait.expected \ - wait.g4a \ - endif.expected \ - endif.g4a \ - declare.expected \ - declare.g4a \ - immediate.g4a \ - immediate.expected - -EXTRA_DIST = \ - ${TESTDATA} \ - run-test.sh - -$(TESTS): run-test.sh - sed "s|TEST|$@|g" ${srcdir}/run-test.sh > $@ - chmod +x $@ - -CLEANFILES = \ - *.out \ - ${TESTS} diff --git a/assembler/test/run-test.sh b/assembler/test/run-test.sh index 27c5c2d..20a408c 100644 --- a/assembler/test/run-test.sh +++ b/assembler/test/run-test.sh @@ -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