guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

06/08: tests: Clean up after 'tests/guix-package-net.sh'.


From: guix-commits
Subject: 06/08: tests: Clean up after 'tests/guix-package-net.sh'.
Date: Sun, 16 Jan 2022 17:59:27 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 686f2eae348a44f76afe1fa73230dd87578c227d
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Jan 16 23:42:07 2022 +0100

    tests: Clean up after 'tests/guix-package-net.sh'.
    
    * tests/guix-package-net.sh: Remove second 'trap' line.  Change first
    'trap' line to remove "$module_dir" and *.lock files.
---
 tests/guix-package-net.sh | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/tests/guix-package-net.sh b/tests/guix-package-net.sh
index 6d21c6cff6..a3beb238fe 100644
--- a/tests/guix-package-net.sh
+++ b/tests/guix-package-net.sh
@@ -1,5 +1,5 @@
 # GNU Guix --- Functional package management for GNU
-# Copyright © 2012, 2013, 2014, 2015, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2012-2015, 2017, 2019, 2022 Ludovic Courtès <ludo@gnu.org>
 # Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
 # Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
 #
@@ -50,7 +50,10 @@ profile="t-profile-$$"
 profile_alt="t-profile-alt-$$"
 rm -f "$profile"
 
-trap 'rm -f "$profile" "$profile_alt" "$profile-"[0-9]* "$profile_alt-"[0-9]* 
; rm -rf t-home-'"$$" EXIT
+module_dir="t-guix-package-net-$$"
+mkdir "$module_dir"
+
+trap 'rm -f "$profile" "$profile_alt" "$profile.lock" "$profile_alt.lock" 
"$profile-"[0-9]* "$profile_alt-"[0-9]* ; rm -r "$module_dir" t-home-'"$$" EXIT
 
 
 guix package --bootstrap -p "$profile" -i guile-bootstrap
@@ -177,10 +180,6 @@ guix package -p "$profile" -p "$profile_alt" 
--search-paths \
      | grep "LIBRARY_PATH.*$profile/lib.$profile_alt/lib"
 
 # Simulate an upgrade and make sure the package order is preserved.
-module_dir="t-guix-package-net-$$"
-trap 'rm -rf "$module_dir"' EXIT
-
-mkdir "$module_dir"
 cat > "$module_dir/new.scm" <<EOF
 (define-module (new)
   #:use-module (guix)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]