From patchwork Sat Oct 28 14:08:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 55463 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 A2A7A27BBE9; Sat, 28 Oct 2023 15:10:03 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 192C227BBE2 for ; Sat, 28 Oct 2023 15:10:02 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwk0L-0000kv-AT; Sat, 28 Oct 2023 10:09:33 -0400 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 1qwk0I-0000ju-5e for guix-patches@gnu.org; Sat, 28 Oct 2023 10:09:31 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qwk0H-0000L7-Kv for guix-patches@gnu.org; Sat, 28 Oct 2023 10:09:29 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qwk0n-0001g4-JY for guix-patches@gnu.org; Sat, 28 Oct 2023 10:10:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66793] [PATCH 1/3] tests: Make =?utf-8?b?4oCYZ3VpeCB0aW1lLW1h?= =?utf-8?b?Y2hpbmXigJk=?= test effective. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 28 Oct 2023 14:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66793 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66793@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 66793-submit@debbugs.gnu.org id=B66793.16985021786400 (code B ref 66793); Sat, 28 Oct 2023 14:10:01 +0000 Received: (at 66793) by debbugs.gnu.org; 28 Oct 2023 14:09:38 +0000 Received: from localhost ([127.0.0.1]:39299 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qwk0Q-0001f3-5k for submit@debbugs.gnu.org; Sat, 28 Oct 2023 10:09:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qwk0O-0001ei-C0 for 66793@debbugs.gnu.org; Sat, 28 Oct 2023 10:09:36 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qwjzm-0000Ja-W0; Sat, 28 Oct 2023 10:08:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=2wYSI9vfiptedBsb7H+Psw3dlncWoFG/Nf0+76RotLk=; b=UW96iN3GYde10ouoEkgO o9Q7k1TGNENHTt59sGuRa9ELJpHq7o7VXcF4TsvnutIYYf34JYy92p8uJTDI8PbUzRunrMgTEqJkR Ro6XeUzAiTUNCIp/PFMiyZSniE3lp3i1wdvw86MkEcNUpbZ0RSihFpuJBJBCn7C+4KUW1PNlqu5vu Xj115eziGFB4xsVX2yTDUbH5mNnMGsNaf+MFX/eoumFbjnx4vw7/X/IH573Nh9P6MHOR7PVtuOvyo 9DmFVQIUaTncFqcNE/hSIt/asdsi3fDS4rTaNWxn+HCooCa+7oA+9OjMU1lDiGYZvItSXA3HBUyC+ S11BVh9plRC1ww==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Sat, 28 Oct 2023 16:08:33 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.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: , 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 The test as added in 79ec651a286c71a3d4c72be33a1f80e76a560031 had no effect: first because ‘guix time-machine --commit=X’, not followed by a command, does nothing, and second because the “! COMMAND” shell stanza does not have the desired effect (see ). This change rewrites the test to make it effective. * tests/guix-time-machine.sh: Rewrite. Change-Id: Ib44a11331c8625e346139a236cffa699cdbd02f2 --- tests/guix-time-machine.sh | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/tests/guix-time-machine.sh b/tests/guix-time-machine.sh index 8b62ef75ea..a78c1533fb 100644 --- a/tests/guix-time-machine.sh +++ b/tests/guix-time-machine.sh @@ -1,5 +1,6 @@ # GNU Guix --- Functional package management for GNU # Copyright © 2023 Maxim Cournoyer +# Copyright © 2023 Ludovic Courtès # # This file is part of GNU Guix. # @@ -20,9 +21,24 @@ # Test the 'guix time-machine' command-line utility. # -guix time-machine --version +if [ -d "$abs_top_srcdir/.git" ] \ + || guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null +then + guix time-machine --version +else + echo "This test requires networking or a local Git checkout; skipping." >&2 + exit 77 +fi -# Visiting a commit older than v1.0.0 fails. -! guix time-machine --commit=v0.15.0 +if [ -d "$abs_top_srcdir/.git" ] +then + EXTRA_OPTIONS="--url=$abs_top_srcdir" +else + EXTRA_OPTIONS="" +fi -exit 0 +# Visiting a commit older than v1.0.0 must fail (this test is expensive +# because it clones the whole repository). +guix time-machine -q --commit=v0.15.0 $EXTRA_OPTIONS -- describe && false + +true