From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id +I91AmGEG2IXXwEAgWs5BA (envelope-from ) for ; Sun, 27 Feb 2022 15:02:09 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id +HXiNmCEG2JeVgEAG6o9tA (envelope-from ) for ; Sun, 27 Feb 2022 15:02:08 +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 8B3EA43231 for ; Sun, 27 Feb 2022 15:02:08 +0100 (CET) Received: from localhost ([::1]:41438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOK7j-0003Jo-7l for larch@yhetil.org; Sun, 27 Feb 2022 09:02:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOK0w-0000WM-8T for guix-patches@gnu.org; Sun, 27 Feb 2022 08:55:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35055) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOK0v-0001t0-5C for guix-patches@gnu.org; Sun, 27 Feb 2022 08:55:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOK0v-0004uL-4M for guix-patches@gnu.org; Sun, 27 Feb 2022 08:55:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54180] [PATCH 09/12] tests: Check 'guix home reconfigure' for a second generation. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 13:55:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54180 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54180@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 54180-submit@debbugs.gnu.org id=B54180.164597006918739 (code B ref 54180); Sun, 27 Feb 2022 13:55:05 +0000 Received: (at 54180) by debbugs.gnu.org; 27 Feb 2022 13:54:29 +0000 Received: from localhost ([127.0.0.1]:57170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOK0K-0004s4-KS for submit@debbugs.gnu.org; Sun, 27 Feb 2022 08:54:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOK0B-0004qL-EB for 54180@debbugs.gnu.org; Sun, 27 Feb 2022 08:54:20 -0500 Received: from [2001:470:142:3::e] (port=50244 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOK01-0001Zp-Cn; Sun, 27 Feb 2022 08:54:11 -0500 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=kRaL04jmZdrVlSDR58XrELI9WO17jDsb7AMDz2U7LbM=; b=QFC/VUdAih5+L7iDWGXR odFHQiJjnZVNzbGkR638kbJtfpNSxCqTu8ZBZmzbKdN3+wReJdF1rnO6zW8iDI8z7y2WVPHa4/cXC bvO712P9ALmtRk25Lb/fzNw0b1hn3gXuHmicw9RSGdit5fK99vwvYRAWaOwbFxDpQHP0wEMggddO6 MCMp1CYhzgn5YZybYxGOQhOy2ug78K39mg/WgiH4M5AaxTCNeC0Y8goj0y/fxc5nLzcEUDMIRuQgG Gx0oQofwyn2OUilCyAvSLt1QGtUVSX53apK9UTYZq9tG89QNkgqyQPfyjSQ/CBwaHDG24uuUFFO0y RvXijYW/DidjyA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:55804 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 1nOJzz-0007Pg-VT; Sun, 27 Feb 2022 08:54:09 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Sun, 27 Feb 2022 14:53:39 +0100 Message-Id: <20220227135342.10296-9-ludo@gnu.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220227135342.10296-1-ludo@gnu.org> References: <20220227135342.10296-1-ludo@gnu.org> MIME-Version: 1.0 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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645970528; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=kRaL04jmZdrVlSDR58XrELI9WO17jDsb7AMDz2U7LbM=; b=GMb5M2R4fM9w8gmlicVD3Y4Jl4FY95JQ3UrUs1D0l+B6aB2aE3mzufz3DXzrb7jJ1H9zq2 lAR2EtHtA2F87SSEPCEXj7ojFKpIwFqk/MqNaN2Ck7p/te2CSJdzNgC8ATdzRcIPbXGp2I PXmVmTQ3X7juFRUHQa9FxITc7vg9maKOBCMy5rSc8ReKKHnhRuv135uYmFYcgT7UcyD7SN gKhOL8mOZsVUV7yu4MiiFU6iZGE4u+/Ed+dOxjFNQj1eU1BtjPAZjOi53ZOBMfFCyHrGWI JTEmbjPd9jv6mtRbghQxyLRveeQsV6XlTXvBV9HLqG0/apUYcU49CIcRNZ8ygQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645970528; a=rsa-sha256; cv=none; b=L91YKcvdB5uqex0dXiw76FVrOKSq1rqvckfJpw/NFFuEA6rKqOao5kdz7mExnMNfKIaVdC KBGt+SEs7XnhiJbAXRKbqZfeQtD4f8NdZpPkDH4zEvLtGM8QlDNP5d/pAuxJWxJRIjYKlB 4ZJjHpL+MDrb4w1RrIH6B9rnYF5ARabvQcZ57UAhSZmUvplCFQSy5ins6kFvlvLgmsT2DX H6tC3e3SzXQX6Y5pRi9QhhVeeZIa1+HUsSybvjR0k2ItRkZCal0UoInbR5NIVEtZlKKEG/ /4YIOdKv+baFyIqV72s6pI4OO82cCPu09WnDYUh2zwKFYJNfcWPo6lQvRDLBXg== 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="QFC/VUdA"; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Spam-Score: -2.91 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="QFC/VUdA"; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Queue-Id: 8B3EA43231 X-Spam-Score: -2.91 X-Migadu-Scanner: scn0.migadu.com X-TUID: LDWrvtDS1uCs * tests/guix-home.sh: Invoke "guix home reconfigure" a second time with a modify config file and check the result. --- tests/guix-home.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/guix-home.sh b/tests/guix-home.sh index 3b397649cc..f054d15172 100644 --- a/tests/guix-home.sh +++ b/tests/guix-home.sh @@ -108,6 +108,7 @@ EOF # Make sure preexisting files were backed up. grep "overridden" "$HOME"/*guix-home*backup/.bashrc grep "overridden" "$HOME"/*guix-home*backup/.config/test.conf + rm -r "$HOME"/*guix-home*backup # # Test 'guix home describe'. @@ -131,6 +132,28 @@ EOF } test "$(canonical_file_name)" == "$(readlink "${HOME}/.guix-home")" + # + # Configure a new generation. + # + + # Change the bashrc snippet content and comment out one service. + sed -i "home.scm" -e's/the content of/the NEW content of/g' + sed -i "home.scm" -e"s/(simple-service 'test-config/#;(simple-service 'test-config/g" + + guix home reconfigure "${test_directory}/home.scm" + test "$(tail -n 2 "${HOME}/.bashrc")" == "\ +# dot-bashrc test file for guix home +# the NEW content of bashrc-test-config.sh" + + # This file must have been removed and not backed up. + ! test -e "$HOME/.config/test.conf" + ! test -e "$HOME"/*guix-home*backup/.config/test.conf + + test "$(cat "$(configuration_file)")" == "$(cat home.scm)" + test "$(canonical_file_name)" == "$(readlink "${HOME}/.guix-home")" + + test $(guix home list-generations | grep "^Generation" | wc -l) -eq 2 + # # Test 'guix home search'. # -- 2.34.0