GNU bug report logs - #59980
[PATCH v2 1/2] build-system/dune: Automatically deduce test-target in most cases.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: raingloom <raingloom@HIDDEN>; Keywords: patch; Done: Julien Lepiller <julien@HIDDEN>; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 59980-close <at> debbugs.gnu.org:


Received: (at 59980-close) by debbugs.gnu.org; 28 Jan 2023 12:29:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 28 07:29:27 2023
Received: from localhost ([127.0.0.1]:39785 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pLkKk-000156-UG
	for submit <at> debbugs.gnu.org; Sat, 28 Jan 2023 07:29:27 -0500
Received: from lepiller.eu ([89.234.186.109]:49416)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <julien@HIDDEN>)
 id 1pLkKi-00014v-V2; Sat, 28 Jan 2023 07:29:25 -0500
Received: from lepiller.eu (localhost [127.0.0.1])
 by lepiller.eu (OpenSMTPD) with ESMTP id e3342b07;
 Sat, 28 Jan 2023 12:29:24 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from
 :to:cc:subject:message-id:in-reply-to:references:mime-version
 :content-type:content-transfer-encoding; s=dkim; bh=vKJR61TqAtRf
 jMoySfdr6sc9VznvV423rKcJd4i7o2s=; b=C2cw4lVmtMs4sb/wkV6sE8QoeF8d
 Zcr8JajfDj0CpX8gd3J8iGuTpqLuKRZa4h6fSCJslB8cuuDRYwHQFvO9m9BriE1Y
 eGv40YK2aUvuz026jxCMdPpZI4zBPrXwQWlDV+hEcCljmyZKyY0vQAtCdnmYzjTv
 fbo+lKyZxkJAYFbVlkQR+vYldyRawsJ6BY7VwtW4oHjU/E90ZIAteg5GAb3tPGjh
 C/5OzyfgzbFYV6u5JaSjM399JEP66Dn5/i3LRNoKZUh8qWLW9Gv89/RykC5oYiwM
 9SgVIv2UeqXsVtaLg3H910tJrZz2T7tCVO+XdsVACpTuGiLojuJsWEd/tQ==
Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 4cc51cc2
 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); 
 Sat, 28 Jan 2023 12:29:23 +0000 (UTC)
Date: Sat, 28 Jan 2023 13:29:22 +0100
From: Julien Lepiller <julien@HIDDEN>
To: raingloom <raingloom@HIDDEN>
Subject: Re: [bug#59980] [PATCH v2 1/2] build-system/dune: Automatically
 deduce test-target in most cases.
Message-ID: <20230128132922.19e9cded@HIDDEN>
In-Reply-To: <20221212000747.24632-1-raingloom@HIDDEN>
References: <20221212000747.24632-1-raingloom@HIDDEN>
X-Mailer: Claws Mail 4.1.1 (GTK 3.24.30; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 59980-close
Cc: 59980-close <at> debbugs.gnu.org, 59981-close <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Actually closing the right ones...




Notification sent to raingloom <raingloom@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Julien Lepiller <julien@HIDDEN>:
You have taken responsibility. Full text available.

Message received at 59980 <at> debbugs.gnu.org:


Received: (at 59980) by debbugs.gnu.org; 28 Jan 2023 12:28:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 28 07:28:46 2023
Received: from localhost ([127.0.0.1]:39780 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pLkK6-00013c-IC
	for submit <at> debbugs.gnu.org; Sat, 28 Jan 2023 07:28:46 -0500
Received: from lepiller.eu ([89.234.186.109]:51574)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <julien@HIDDEN>)
 id 1pLkK5-00013P-0I; Sat, 28 Jan 2023 07:28:45 -0500
Received: from lepiller.eu (localhost [127.0.0.1])
 by lepiller.eu (OpenSMTPD) with ESMTP id 48e8ae94;
 Sat, 28 Jan 2023 12:28:40 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from
 :to:cc:subject:message-id:in-reply-to:references:mime-version
 :content-type:content-transfer-encoding; s=dkim; bh=zlgMyJ6EKtIr
 LBtJDa/Xz2c7IYY+wjqGzyzZCdux144=; b=PFS8QDlZRPOVFa7LdM9B8XCcCaTT
 oVkrDlqcmvxcfEL9dG11aJFKHGiUxC1vVGW3Xsoqd73fqhk1AW5YkrZksLO5Q2iH
 Q5+QKVbYnThe7ao/iE+AY+e8OAQIHmZ8b4v5B+Yt4ExRwP68fJG0HJP1ZdZzQEj2
 Gw2/s8OBfPa23v4zn4pzuZ1jIHWlV3+vZJz8nN9GC2eWsh47FxZyGCswJBmYWPO8
 Ag3tJoD2pB3PVi1wDMWi8/S1tVpZ0zodk9pBuHaa2ke8AHg3WzREneO2AmGjOtHM
 iLb4VUr0oMEC35sRAKNpRBHqvQ4xkEPKQrxIvs6yLY38BFgJr/E2olk60A==
Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 14121f10
 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); 
 Sat, 28 Jan 2023 12:28:40 +0000 (UTC)
Date: Sat, 28 Jan 2023 13:28:39 +0100
From: Julien Lepiller <julien@HIDDEN>
To: raingloom <raingloom@HIDDEN>
Subject: Re: [bug#59980] [PATCH v2 1/2] build-system/dune: Automatically
 deduce test-target in most cases.
Message-ID: <20230128132839.49fab7f0@HIDDEN>
In-Reply-To: <20221212000747.24632-1-raingloom@HIDDEN>
References: <20221212000747.24632-1-raingloom@HIDDEN>
X-Mailer: Claws Mail 4.1.1 (GTK 3.24.30; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 59980
Cc: 59487-close <at> debbugs.gnu.org, 59980 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Closing since a similar patch was pushed already. Thanks!




Information forwarded to guix-patches@HIDDEN:
bug#59980; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Dec 2022 00:08:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 11 19:08:36 2022
Received: from localhost ([127.0.0.1]:49010 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1p4WN1-0004zR-H1
	for submit <at> debbugs.gnu.org; Sun, 11 Dec 2022 19:08:36 -0500
Received: from lists.gnu.org ([209.51.188.17]:48030)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raingloom@HIDDEN>) id 1p4WMz-0004zE-0o
 for submit <at> debbugs.gnu.org; Sun, 11 Dec 2022 19:08:33 -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 <raingloom@HIDDEN>)
 id 1p4WMx-0008De-6k
 for guix-patches@HIDDEN; Sun, 11 Dec 2022 19:08:31 -0500
Received: from mx1.riseup.net ([198.252.153.129])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <raingloom@HIDDEN>)
 id 1p4WMt-0002BC-Ol
 for guix-patches@HIDDEN; Sun, 11 Dec 2022 19:08:30 -0500
Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "mail.riseup.net", Issuer "R3" (not verified))
 by mx1.riseup.net (Postfix) with ESMTPS id 4NVhmT1cvSzDqQw;
 Mon, 12 Dec 2022 00:08:25 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak;
 t=1670803705; bh=WfqYWIunxD7T4IZBtKzX0OqnsZdl7Ky5Sf9GEsiusfQ=;
 h=From:To:Cc:Subject:Date:From;
 b=Z32WWoLBrL1HyMmkESbqrPEXIJLWPZBmrwyUMavCRI7p/Gk32nwnRVsSO8/XYaUG+
 L9NRsH1fMetZSaGYr52jzXC6ekwr0PY+1ZhfwGwS8c9e4ouUKhfth5aTo8Xs04Yt/K
 nS9ceYWxb3TAo/sq/FtItNFNTNY8vTs2eWWHcLd8=
X-Riseup-User-ID: 14814B0792C35106E6D49B1D0A344CEA6D2B5B36C26E08BB409CB5AD694D9A80
Received: from [127.0.0.1] (localhost [127.0.0.1])
 by fews1.riseup.net (Postfix) with ESMTPSA id 4NVhmS0QYZz5vXH;
 Mon, 12 Dec 2022 00:08:23 +0000 (UTC)
From: raingloom <raingloom@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH v2 1/2] build-system/dune: Automatically deduce test-target in
 most cases.
Date: Mon, 12 Dec 2022 00:07:46 +0000
Message-Id: <20221212000747.24632-1-raingloom@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=198.252.153.129;
 envelope-from=raingloom@HIDDEN; helo=mx1.riseup.net
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
Cc: raingloom <raingloom@HIDDEN>, 59487 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

guix/build-system/dune.scm (dune-build): tests? defaults to #f.
guix/build/dune-build-system.scm (check): Missing test-target is auto-detected.
---
 guix/build-system/dune.scm       |  2 +-
 guix/build/dune-build-system.scm | 14 ++++++++++----
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/dune.scm b/guix/build-system/dune.scm
index 12100fd8e8..b531d3c337 100644
--- a/guix/build-system/dune.scm
+++ b/guix/build-system/dune.scm
@@ -107,7 +107,7 @@ (define* (dune-build name inputs
                      (dune-release-flags ''())
                      (tests? #t)
                      (test-flags ''())
-                     (test-target "test")
+                     (test-target #f)
                      (install-target "install")
                      (validate-runpath? #t)
                      (patch-shebangs? #t)
diff --git a/guix/build/dune-build-system.scm b/guix/build/dune-build-system.scm
index e9ccc71057..e1337a3f82 100644
--- a/guix/build/dune-build-system.scm
+++ b/guix/build/dune-build-system.scm
@@ -42,14 +42,20 @@ (define* (build #:key (build-flags '()) (jbuild? #f)
                    build-flags)))
   #t)
 
-(define* (check #:key (test-flags '()) (test-target "test") tests?
+(define* (check #:key (test-flags '()) (test-target #f) tests?
                 (jbuild? #f) (package #f) (dune-release-flags '())
                 #:allow-other-keys)
   "Test the given package."
   (when tests?
-    (let ((program (if jbuild? "jbuilder" "dune")))
-      (apply invoke program "runtest" test-target
-             (append (if package (list "-p" package)
+    (let ((program (if jbuild? "jbuilder" "dune"))
+          (test-target (or test-target
+                           (cond
+                            ((file-exists? "tests") "tests")
+                            ((file-exists? "test") "test")
+                            (else ".")))))
+      (apply invoke program "runtest"
+             (append (if test-target (list test-target) '())
+                     (if package (list "-p" package)
                          dune-release-flags)
                      test-flags))))
   #t)
-- 
2.38.1





Acknowledgement sent to raingloom <raingloom@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#59980; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 28 Jan 2023 12:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.