From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51343) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddNLi-0006xc-MY for guix-patches@gnu.org; Thu, 03 Aug 2017 17:08:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddNLe-00044Q-AY for guix-patches@gnu.org; Thu, 03 Aug 2017 17:08:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:37751) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ddNLe-00043i-4L for guix-patches@gnu.org; Thu, 03 Aug 2017 17:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ddNLd-0001N4-So for guix-patches@gnu.org; Thu, 03 Aug 2017 17:08:01 -0400 Subject: [bug#27938] [PATCH] gnu: git: Enable tests. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddNLK-0006uP-KQ for guix-patches@gnu.org; Thu, 03 Aug 2017 17:07:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddNLG-0003W7-CL for guix-patches@gnu.org; Thu, 03 Aug 2017 17:07:42 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:47179) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ddNLG-0003Vz-8b for guix-patches@gnu.org; Thu, 03 Aug 2017 17:07:38 -0400 From: Marius Bakke Date: Thu, 3 Aug 2017 23:07:30 +0200 Message-Id: <20170803210730.1122-1-mbakke@fastmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 27938@debbugs.gnu.org * gnu/packages/version-control.scm (git)[arguments]: Remove #:tests?. Add 'patch-tests' phase. --- gnu/packages/version-control.scm | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 9274a93f6..99b3dbc4e 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -176,7 +176,6 @@ as well as the classic centralized workflow.") ;; nars; see . "NO_INSTALL_HARDLINKS=indeed") #:test-target "test" - #:tests? #f ; FIXME: Many tests are failing ;; The explicit --with-tcltk forces the build system to hardcode the ;; absolute file name to 'wish'. @@ -203,6 +202,37 @@ as well as the classic centralized workflow.") ;; Add the "PM.stamp" to avoid "no rule to make target". (call-with-output-file "perl/PM.stamp" (const #t)) #t)) + (add-before 'check 'patch-tests + (lambda _ + ;; These files contain some funny bytes that Guile is unable + ;; to decode for shebang patching. Just delete them. + (for-each delete-file '("t/t4201-shortlog.sh" + "t/t7813-grep-icase-iso.sh")) + ;; Many tests contain inline shell scripts (hooks etc). + (substitute* (find-files "t" "\\.sh$") + (("#!/bin/sh") (string-append "#!" (which "sh")))) + ;; Un-do shebang patching here to prevent checksum mismatch. + (substitute* '("t/t4034/perl/pre" "t/t4034/perl/post") + (("^#!.*/bin/perl") "#!/usr/bin/perl")) + (substitute* "t/t5003-archive-zip.sh" + (("cp /bin/sh") (string-append "cp " (which "sh")))) + (substitute* "t/t6030-bisect-porcelain.sh" + (("\"/bin/sh\"") (string-append "\"" (which "sh") "\""))) + ;; FIXME: This test runs `git commit` with a bogus EDITOR + ;; and empty commit message, but does not fail the way it's + ;; expected to. The test passes when invoked interactively. + (substitute* "t/t7508-status.sh" + (("\tcommit_template_commented") "\ttrue")) + ;; More checksum mismatches due to odd shebangs. + (substitute* "t/t9100-git-svn-basic.sh" + (("\"#!/gnu.*/bin/sh") "\"#!/bin/sh")) + (substitute* "t/t9300-fast-import.sh" + (("\t#!/gnu.*/bin/sh") "\t#!/bin/sh") + (("'#!/gnu.*/bin/sh") "'#!/bin/sh")) + ;; FIXME: Some hooks fail with "basename: command not found". + ;; See 't/trash directory.t9164.../svn-hook.log'. + (delete-file "t/t9164-git-svn-dcommit-concurrent.sh") + #t)) (add-after 'install 'install-shell-completion (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) -- 2.13.4