From patchwork Fri Dec 30 11:30:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivien Kraus X-Patchwork-Id: 45725 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id EDF0D27BBED; Fri, 30 Dec 2022 22:39:18 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D019D27BBE9 for ; Fri, 30 Dec 2022 22:39:17 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBO1m-0003up-Ql; Fri, 30 Dec 2022 17:39:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBO1m-0003ua-9b for guix-patches@gnu.org; Fri, 30 Dec 2022 17:39:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pBO1m-0001Ik-06 for guix-patches@gnu.org; Fri, 30 Dec 2022 17:39:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pBO1l-0005O9-MU for guix-patches@gnu.org; Fri, 30 Dec 2022 17:39:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60358] [PATCH v5 2/5] gnu: gnulib: Enable tests. References: In-Reply-To: Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Dec 2022 22:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60358 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60358@debbugs.gnu.org Cc: Liliana Marie Prikler Received: via spool by 60358-submit@debbugs.gnu.org id=B60358.167243988520603 (code B ref 60358); Fri, 30 Dec 2022 22:39:01 +0000 Received: (at 60358) by debbugs.gnu.org; 30 Dec 2022 22:38:05 +0000 Received: from localhost ([127.0.0.1]:36235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBO0q-0005ME-To for submit@debbugs.gnu.org; Fri, 30 Dec 2022 17:38:05 -0500 Received: from planete-kraus.eu ([89.234.140.182]:35938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBO0l-0005LH-Qu for 60358@debbugs.gnu.org; Fri, 30 Dec 2022 17:38:01 -0500 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id dd7f1003; Fri, 30 Dec 2022 22:37:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h=from :date:subject:to:cc:message-id:mime-version; s=dkim; bh=xYq/XG5k zEXMhfgsT4iVf3k7aww=; b=aBQqjdDGTfFi7if2/fMi5SY9WaBuTooJFF0jZ+1w /wu1Msm3xexQZHvoG2f9RP9phS43yTnphOaeZWWTjpzKPPMtE66aex7+WAYv004y Er+VT9rYhFxn2+aeU+jNzAePBUDgR+sTOUbHl+n3U7mrJqLPVkYzUhD94TzYWtsX MnQ= Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 44871be6 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Fri, 30 Dec 2022 22:37:56 +0000 (UTC) Date: Fri, 30 Dec 2022 12:30:54 +0100 Message-ID: MIME-Version: 1.0 User-Agent: Evolution 3.46.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Vivien Kraus X-ACL-Warn: , Vivien Kraus via Guix-patches X-Patchwork-Original-From: Vivien Kraus via Guix-patches via From: Vivien Kraus Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/build-tools.scm (gnulib-checkout) [fix-tests]: New phase. Create a git repository so that every file is committed. * gnu/packages/build-tools.scm (gnulib-checkout): [disable-failing-tests]: New phase. * gnu/packages/build-tools.scm (gnulib-checkout): [install]: Delete the fake git repository. * gnu/packages/build-tools.scm (gnulib-checkout): [native-inputs]: Add more tools for the tests. --- gnu/packages/build-tools.scm | 54 +++++++++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 4 deletions(-) diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm index bde4ee0973..5fa2b7234c 100644 --- a/gnu/packages/build-tools.scm +++ b/gnu/packages/build-tools.scm @@ -43,11 +43,14 @@ (define-module (gnu packages build-tools) #:use-module (guix build-system cmake) #:use-module (gnu packages) #:use-module (gnu packages adns) + #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages check) + #:use-module (gnu packages code) #:use-module (gnu packages compression) #:use-module (gnu packages cpp) + #:use-module (gnu packages cppi) #:use-module (gnu packages elf) #:use-module (gnu packages linux) #:use-module (gnu packages lisp) @@ -830,16 +833,59 @@ (define*-public (gnulib-checkout #:key (list #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'fix-tests + (lambda _ + (substitute* "Makefile" + (("-f maint.mk syntax-check") + "_gl-Makefile=yes -f maint.mk syntax-check")) + (invoke "git" "init") + (invoke "git" "config" "user.name" "Guix") + (invoke "git" "config" "user.email" "guix@localhost") + (invoke "git" "add" ".") + (invoke "git" "commit" "-m" + "Syntax checks are only run against committed files, so commit everything."))) + (add-after 'fix-tests 'disable-failing-tests + (lambda _ + (substitute* "cfg.mk" + (("local-checks-to-skip =") + "local-checks-to-skip = \\ + sc_Wundef_boolean \\ + sc_file_system \\ + sc_indent \\ + sc_keep_gnulib_texi_files_mostly_ascii \\ + sc_prohibit_assert_without_use \\ + sc_prohibit_close_stream_without_use \\ + sc_prohibit_defined_have_decl_tests \\ + sc_prohibit_doubled_word \\ + sc_prohibit_empty_lines_at_EOF \\ + sc_prohibit_intprops_without_use \\ + sc_prohibit_openat_without_use \\ + sc_prohibit_test_minus_ao \\ + sc_unportable_grep_q")) + (substitute* "Makefile" + (("sc_check_sym_list") + "disabled_check_sym_list") + (("sc_cpp_indent_check") + "disabled_cpp_indent_check") + (("sc_check_copyright") + "disabled_check_copyright") + (("sc_prohibit_AC_LIBOBJ_in_m4") + "disabled_prohibit_AC_LIBOBJ_in_m4") + (("sc_prefer_ac_check_funcs_once") + "disabled_prefer_ac_check_funcs_once") + (("sc_prohibit_leading_TABs") + "disabled_prohibit_leading_TABs")))) (delete 'configure) (replace 'install (lambda _ (install-file "gnulib-tool" (string-append #$output "/bin")) - (copy-recursively "." (string-append #$output "/src/gnulib/"))))) - #:tests? #f)) ;; Tests are syntax and indentation checks for the - ;; maintainer. And they are failing. + (delete-file-recursively ".git") + (copy-recursively "." (string-append #$output "/src/gnulib/"))))))) (inputs ;; Shebangs for some auxiliary build files. - (list python perl clisp)) + (list python perl clisp + ;; Programs for the tests: + cppi indent git autoconf)) (home-page "https://www.gnu.org/software/gnulib/") (synopsis "Source files to share among distributions") (description