From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iJUwJYyEG2LNOQAAgWs5BA (envelope-from ) for ; Sun, 27 Feb 2022 15:02:52 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id GCW/IYyEG2K7NQAAauVa8A (envelope-from ) for ; Sun, 27 Feb 2022 15:02:52 +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 4149239840 for ; Sun, 27 Feb 2022 15:02:52 +0100 (CET) Received: from localhost ([::1]:42376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOK8Q-00044M-JS for larch@yhetil.org; Sun, 27 Feb 2022 09:02:50 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50706) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOK11-0000Xi-5v for guix-patches@gnu.org; Sun, 27 Feb 2022 08:55:13 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35060) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOK0x-0001to-Gu for guix-patches@gnu.org; Sun, 27 Feb 2022 08:55:07 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOK0x-0004uw-G0 for guix-patches@gnu.org; Sun, 27 Feb 2022 08:55:07 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54180] [PATCH 07/12] tests: Make sure 'guix home reconfigure' backs up files. 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:07 +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.164597007118775 (code B ref 54180); Sun, 27 Feb 2022 13:55:07 +0000 Received: (at 54180) by debbugs.gnu.org; 27 Feb 2022 13:54:31 +0000 Received: from localhost ([127.0.0.1]:57180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOK0M-0004sf-MP for submit@debbugs.gnu.org; Sun, 27 Feb 2022 08:54:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOK0A-0004qH-Ps for 54180@debbugs.gnu.org; Sun, 27 Feb 2022 08:54:25 -0500 Received: from [2001:470:142:3::e] (port=50240 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 1nOJzw-0001Zc-Mf; Sun, 27 Feb 2022 08:54:08 -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=rUm49j68/EWeFH8IeWP5cuqsDExkhaRgEo7KyXRQJD0=; b=rUy7dXm2drVZZuu6Z47v CdZhn4dqkLxD3/wV5YTKhDeNjX7MpFHXtDZdyvVMgta1LxhL0+ErNIiut1B1G4wFUh+UNQ5sHqEKJ 6GM0GZyl/JVIwmle8o4TEejPs6jjMFxBTbNcyeJC/tu0Y06uvYZRIgBXlNNKFs0DjuW4HqbnlbA5l wXO1/5r1l7q0/b04bptGXMUQftgXjRtrgoe+2mIy8NX9sYOJQ/GaAbbdE0I0y5NCvSzxbKSo32//H AmPEZDKekeI8QDMWroRIoNJvwGH8tDPrCBSLr75ZihGNjaSWpuC9zqBlf0iTWvdvXj/n7IVC1ngX+ YPUp7PrD4BPv5w==; 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 1nOJzw-0007Pg-8Q; Sun, 27 Feb 2022 08:54:04 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Sun, 27 Feb 2022 14:53:37 +0100 Message-Id: <20220227135342.10296-7-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-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" 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=1645970572; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=rUm49j68/EWeFH8IeWP5cuqsDExkhaRgEo7KyXRQJD0=; b=ociCUljX+a32CkpW/SXermxROVi/N4XWyeeepYMAxUlJIXe1Wbqx+X6ekC+8W2tuUgISpf 1BcUNQJJKHj8FWveiWFsy46qA15sFjIZa/I3fbTN2NmPf2Ci1eXkjvmPV4ePs/bAuuFO1o zu2AGrsxi+I5eGZhs2un4QUp2yzoUpKtDlwVDu+orysGRxp7ol4IOFajCY4G0FECbEIo90 5UtLC1magtFRlboPuwYzXKnDGs4D+/avjojYjKr10twBu9L1T6IqUJPWG3isEbVUKOWIg4 pawLp/r1o3E2w8rSvmFmUeFRK/yUWTwGp10mIhzCi7guTlMhIKZ78oUmu/mUUA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645970572; a=rsa-sha256; cv=none; b=fsmqY0IocWLxpF5h/LRMVHZ4CW0AMjMYlcCMo7t2uwgv1Sn0OGEIRhnaJx0Rd1bm62n38/ 1CqQ0x+aIASqr8dEfRoIdv4GbqWQHj8+yXpQSjILEdglOm6P7/IZPxo6hHG76mXfRnWKCV 8v/FaITDqhFo7skmaC4nK7zIs43dGe4P5RHp1doiC+ZUL2hUW5VCZki1YaMPqxurntcnXw EEnbjA8g3Y4kma6bSwpE44HLMYK7TWlQNj+9Ywnb4sqWWc6HnKX8atq31ezKlsRxgY1BNe x68K+t5ho+m8FSmlvIYn0CNFKRW1gTX//zD4g5qDY5y1tIFo/OOFvqB/BEYKYA== 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=rUy7dXm2; 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: -3.41 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=rUy7dXm2; 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: 4149239840 X-Spam-Score: -3.41 X-Migadu-Scanner: scn0.migadu.com X-TUID: QJ0Co6s8UZNc * tests/guix-home.sh: Create ~/.bashrc and ~/.config/test.conf prior to 'reconfigure' and check whether they were backed up. --- tests/guix-home.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/guix-home.sh b/tests/guix-home.sh index e578559c97..ae3e52c9e1 100644 --- a/tests/guix-home.sh +++ b/tests/guix-home.sh @@ -1,7 +1,7 @@ - # GNU Guix --- Functional package management for GNU # Copyright © 2021 Andrew Tropin # Copyright © 2021 Oleg Pykhalov +# Copyright © 2022 Ludovic Courtès # # This file is part of GNU Guix. # @@ -54,7 +54,12 @@ trap 'chmod -Rf +w "$test_directory"; rm -rf "$test_directory"' EXIT # Test 'guix home reconfigure'. # - printf "# dot-bashrc test file for guix home" > "dot-bashrc" + echo "# This file will be overridden and backed up." > "$HOME/.bashrc" + mkdir "$HOME/.config" + echo "This file will be overridden too." > "$HOME/.config/test.conf" + echo "This file will stay around." > "$HOME/.config/random-file" + + echo -n "# dot-bashrc test file for guix home" > "dot-bashrc" cat > "home.scm" <<'EOF' (use-modules (guix gexp) @@ -100,6 +105,13 @@ EOF # the content of bashrc-test-config.sh" grep -q "the content of ~/.config/test.conf" "${HOME}/.config/test.conf" + # This one should still be here. + grep "stay around" "$HOME/.config/random-file" + + # Make sure preexisting files were backed up. + grep "overridden" "$HOME"/*guix-home*backup/.bashrc + grep "overridden" "$HOME"/*guix-home*backup/.config/test.conf + # # Test 'guix home describe'. # -- 2.34.0