From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id cHHAHKFbtGNEUQEAbAwnHQ (envelope-from ) for ; Tue, 03 Jan 2023 17:45:21 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id QLTRG6FbtGNnZAEAG6o9tA (envelope-from ) for ; Tue, 03 Jan 2023 17:45:21 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DD50012D09 for ; Tue, 3 Jan 2023 17:45:20 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pCkPX-0004iL-6q; Tue, 03 Jan 2023 11:45:11 -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 1pCkPP-0004h0-VM for guix-patches@gnu.org; Tue, 03 Jan 2023 11:45:04 -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 1pCkPP-0006EG-Mw for guix-patches@gnu.org; Tue, 03 Jan 2023 11:45:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pCkPO-0002fJ-B1; Tue, 03 Jan 2023 11:45:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60520] [PATCH 0/4] Tests for 'guix refresh' Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: rekado@elephly.net, h.goebel@crazy-compilers.com, guix-patches@gnu.org Resent-Date: Tue, 03 Jan 2023 16:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60520 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60520@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Ricardo Wurmus , Hartmut Goebel X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Ricardo Wurmus , Hartmut Goebel Received: via spool by submit@debbugs.gnu.org id=B.167276430010218 (code B ref -1); Tue, 03 Jan 2023 16:45:02 +0000 Received: (at submit) by debbugs.gnu.org; 3 Jan 2023 16:45:00 +0000 Received: from localhost ([127.0.0.1]:46562 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCkPL-0002ek-U6 for submit@debbugs.gnu.org; Tue, 03 Jan 2023 11:45:00 -0500 Received: from lists.gnu.org ([209.51.188.17]:32814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCkPI-0002eZ-2t for submit@debbugs.gnu.org; Tue, 03 Jan 2023 11:44:58 -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 1pCkPH-0004dC-UT for guix-patches@gnu.org; Tue, 03 Jan 2023 11:44:55 -0500 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 1pCkPG-00065f-MX; Tue, 03 Jan 2023 11:44:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=8+5sp1yzINTwHqSTraGcml3nsCIl7XRLKv0ROi48H6Q=; b=ZLZA0fC9E7OT+D KOrlBWY9tYHa02CXXTQgCMGhCpgKA+O97Z1ZGS2mGLJF7FZSZCeN3g3z0hw5d2ZbPIclAtBpyJ47Y Eo4Js/G6SQkSqZOGYQT/vGGSJTuKCMffh9e+SCQE1KZGMDBUCc4e0k77GpDuS70D3SDlUdM/JejE2 GVA3T0x7z8aGJfTmLfcS1QW1BxVnZvx2bBbjnCVYCwsR1PHe+51FwljHFHLN6hpxp5SjFODNcxmnj SzNu58tmms9uayjoCui99bpuBJTOqnwMNsaQVxtds7EetylOdCdeZvDrpvoNW5Ny9ftfxiJITS5gJ dosAUWpC1Md47YJL4qDQ==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pCkPG-0002Z7-6M; Tue, 03 Jan 2023 11:44:54 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Tue, 3 Jan 2023 17:44:39 +0100 Message-Id: <20230103164439.16477-1-ludo@gnu.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1672764321; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=8+5sp1yzINTwHqSTraGcml3nsCIl7XRLKv0ROi48H6Q=; b=MxO3P5oN45eVvbGeEZSjgs12g/uRLqn60mD/8mvabbvRViYeT6wNTnkTfbQxcFU+/PIGoL J807yR6Br3uBscQ2ouxl0kYjymL1jJ2lcgErjwCq0dpWV0SBg8ClfqqPD18GtdQfQnB3SO O1qsH8FMOuqg0zbXy18dTarZDmFE0jZipeIn3MS7BA27WuBdRo2fmMkYnVazU8C9xeocLs 4JJCz6TrOFYK4hmArjZLZNdV1ILtjrsjBjCZXarTutKXqlTUMLVNYAU+RV60+72LmmCH93 8DMgNrmfBgYyc1UxWxGuAK5BdG67XV421IDbn70L9K9mUzRhEa0Y1a/dNOTp/Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=ZLZA0fC9; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1672764321; a=rsa-sha256; cv=none; b=RRNC5siCzXp0v0SBGoSgzs/xwImbCv4ZvsC3vxF4zgUt3ac8SwuIr/1Yp065e1iouuP4XJ FGIO7z5DDGSZe2DXdLXJY14QvyyMUyDmvFlEBOHjXPcLh1Ws8ULRcrHETBQdZN/tZaai3/ UELvHsJeWrDh4hXqtDhcznPsWP2IwMGWHajVSuYIFMR2Ihtub94ZoJpg92PT8lCuoAxZ7y Wp6QYV17xvdhVD3/kkmRrbAkkXij2RuaxIcCw8RKeggZn5oEGqrWVSZ+iw1XUc6V6zZCBv I6Xr5JAdQAyDdxdvJN3CgjpPI925sq8XpJVU6rYVWZMxMLnyha6KMwlSA7WKlw== X-Spam-Score: -2.96 X-Migadu-Queue-Id: DD50012D09 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=ZLZA0fC9; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -2.96 X-TUID: W4TRZc6WC3lF Hi! Following the discussion at , I thought it’s about time to have tests for the ‘guix refresh’ CLI (so far we had tests for importers, for (guix gnu-maintenance), and for (guix upstream), but that did not cover the logic in ‘guix refresh’ itself as we’ve seen). The strategy is to define a “pseudo updater”: the test defines an environment variable that specifies which package updates the updater should simulate, and then we go on using ‘guix refresh’. Thoughts? Ludo’. Ludovic Courtès (4): gnu-maintenance: Factorize 'false-if-networking-failure'. gnu-maintenance: 'gnu' and 'gnu-ftp' predicates catch networking errors. import: stackage: Catch networking errors in predicate. refresh: Add CLI tests. Makefile.am | 4 +- guix/gnu-maintenance.scm | 31 ++++------- guix/import/stackage.scm | 15 ++--- guix/import/test.scm | 88 +++++++++++++++++++++++++++++ guix/import/utils.scm | 24 +++++++- tests/guix-refresh.sh | 117 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 251 insertions(+), 28 deletions(-) create mode 100644 guix/import/test.scm create mode 100644 tests/guix-refresh.sh base-commit: 473692b812b4ab4267d9bddad0fb27787d2112ff -- 2.38.1