From 50fb72597db3448c13c74f33f864b00c7da977fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 4 Jun 2026 23:16:42 +0200 Subject: =?UTF-8?q?tests:=20Fix=20=E2=80=9Cappimage=20+=20localstatedir?= =?UTF-8?q?=E2=80=9D=20test.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * tests/pack.scm ("appimage + localstatedir"): Create file “OUTPUT” and then copy it to #$output. Change-Id: I73be47a336e46c7099b940a02b13f8192145a185 Signed-off-by: Ludovic Courtès --- tests/pack.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tests/pack.scm') diff --git a/tests/pack.scm b/tests/pack.scm index 5422e156b90..66868ea3e61 100644 --- a/tests/pack.scm +++ b/tests/pack.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2017-2021, 2023, 2024 Ludovic Courtès +;;; Copyright © 2017-2021, 2023-2024, 2026 Ludovic Courtès ;;; Copyright © 2018 Ricardo Wurmus ;;; Copyright © 2021, 2023, 2025 Maxim Cournoyer ;;; Copyright © 2023 Oleg Pykhalov @@ -386,12 +386,17 @@ (check (gexp->derivation "check-appimage-with-localstatedir" #~(begin + ;; Create a file in $PWD and only then copy it to + ;; #$output, because #$output within the image's + ;; execution environment refers to its temporary store, + ;; not to the "real one". (system* #$image "--appimage-extract-and-run" "-c" (object->string - `(call-with-output-file #$output + `(call-with-output-file "OUTPUT" (lambda (port) (display "Hello from Guile!\n" port))))) + (copy-file "OUTPUT" #$output) (system* #$image "--appimage-extract") (exit (file-exists? "squashfs-root/var/guix/db/db.sqlite")))))) (mbegin %store-monad -- cgit v1.2.3