summary refs log tree commit diff
path: root/tests/guix-pack.sh
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-02-27 23:20:26 +0100
committerLudovic Courtès <ludo@gnu.org>2023-02-27 23:40:43 +0100
commit92a0e60a963a54230e400c5c2ae585205489bf35 (patch)
treeda7cef4ab0f369f6502bbe1340c6e665f70dcbd7 /tests/guix-pack.sh
parenta31225badbd9422b8394d19c039a1851a3f93e04 (diff)
downloadguix-92a0e60a963a54230e400c5c2ae585205489bf35.tar.gz
pack: Adjust shell tests to read-only tarball root.
Fixes <https://issues.guix.gnu.org/61853>.

Fixes a regression introduced in
68380db4c40a2ee1156349a87254fd7b1f1a52d5, whereby the tarball's root
entry is now read-only, due to the creation of "profile-directory" in
the store.

* tests/guix-pack.sh: Remove and recreate $test_directory before
transformation option test.
* tests/guix-pack-relocatable.sh: Add "chmod +w $test_directory" lines
before attempts to write to it.
Diffstat (limited to 'tests/guix-pack.sh')
-rw-r--r--tests/guix-pack.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/guix-pack.sh b/tests/guix-pack.sh
index 6fc9e3723b..a13e0ededf 100644
--- a/tests/guix-pack.sh
+++ b/tests/guix-pack.sh
@@ -1,6 +1,6 @@
 # GNU Guix --- Functional package management for GNU
 # Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
-# Copyright © 2018, 2019, 2020, 2022 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2018, 2019, 2020, 2022, 2023 Ludovic Courtès <ludo@gnu.org>
 #
 # This file is part of GNU Guix.
 #
@@ -114,7 +114,8 @@ guix pack --dry-run --bootstrap --target=arm-linux-gnueabihf coreutils
 guix pack -R --dry-run --bootstrap -S /mybin=bin guile-bootstrap
 
 # Make sure package transformation options are honored.
-mkdir -p "$test_directory"
+chmod -Rf +w "$test_directory"; rm -r "$test_directory"
+mkdir -p "$test_directory" -m 755
 drv1="`guix pack --no-grafts -n guile 2>&1 | grep pack.*\.drv`"
 drv2="`guix pack --no-grafts -n --with-source=guile=$test_directory guile 2>&1 | grep pack.*\.drv`"
 test -n "$drv1"