summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/guix-describe.sh4
-rw-r--r--tests/guix-shell.sh10
-rw-r--r--tests/guix-system.sh29
-rw-r--r--tests/read-print.scm3
4 files changed, 33 insertions, 13 deletions
diff --git a/tests/guix-describe.sh b/tests/guix-describe.sh
index af523f0a0b..ca7b63ce3b 100644
--- a/tests/guix-describe.sh
+++ b/tests/guix-describe.sh
@@ -1,5 +1,5 @@
# GNU Guix --- Functional package management for GNU
-# Copyright © 2018 Ludovic Courtès <[email protected]>
+# Copyright © 2018, 2022 Ludovic Courtès <[email protected]>
#
# This file is part of GNU Guix.
#
@@ -39,7 +39,7 @@ then
fi
guix describe -f channels
case "`guix describe -f channels | grep url`" in
- *"(url \"$abs_top_srcdir\")") true;;
+ *"(url \"$abs_top_srcdir/\")") true;;
*) false;;
esac
else
diff --git a/tests/guix-shell.sh b/tests/guix-shell.sh
index 6340f90574..9a6b055264 100644
--- a/tests/guix-shell.sh
+++ b/tests/guix-shell.sh
@@ -38,6 +38,16 @@ guix shell --bootstrap --pure guile-bootstrap -- guile --version
# Rejecting unsupported packages.
! guix shell -s armhf-linux intelmetool -n
+# Test approximately that the child process does not inherit extra file
+# descriptors. Ideally we'd check there's nothing more than 0, 1, and 2, but
+# we cannot do that because (1) we might be inheriting additional FDs, for
+# example due to <https://issues.guix.gnu.org/57567>, and (2) Bash itself
+# opens a couple of extra FDs.
+initial_fd_list="$(echo /proc/$$/fd/*)"
+fd_list="$(guix shell --bootstrap guile-bootstrap -- \
+ "$SHELL" -c 'echo /proc/$$/fd/*')"
+test "$(echo $fd_list | wc -w)" -le "$(echo $initial_fd_list | wc -w)"
+
# Ignoring unauthorized files.
cat > "$tmpdir/guix.scm" <<EOF
This is a broken guix.scm file.
diff --git a/tests/guix-system.sh b/tests/guix-system.sh
index 044fd131d6..f76a5ce119 100644
--- a/tests/guix-system.sh
+++ b/tests/guix-system.sh
@@ -335,22 +335,29 @@ rm "$tmpdir/search"
# Verify that the examples can be built.
for example in gnu/system/examples/*.tmpl; do
- if echo "$example" | grep hurd; then
- options="--target=i586-pc-gnu"
- elif echo "$example" | grep asus; then
- # 'asus-c201.tmpl' uses 'linux-libre-arm-generic', which is an
- # ARM-only package.
- options="--system=armhf-linux"
- else
- options=""
- fi
+ case "$example" in
+ *hurd*)
+ options="--target=i586-pc-gnu";;
+ *asus*)
+ # 'asus-c201.tmpl' uses 'linux-libre-arm-generic', which is an
+ # ARM-only package.
+ options="--system=armhf-linux";;
+ *vm-image*)
+ # The VM image tries to build 'current-guix' as per 'guix pull'.
+ # Skip it.
+ continue
+ ;;
+ *)
+ options=""
+ ;;
+ esac
guix system -n disk-image $options "$example"
done
# Verify that the images can be built.
-guix system -n vm gnu/system/examples/vm-image.tmpl
+guix system -n vm gnu/system/examples/bare-bones.tmpl
guix system -n image gnu/system/images/pinebook-pro.scm
-guix system -n image -t qcow2 gnu/system/examples/vm-image.tmpl
+guix system -n image -t qcow2 gnu/system/examples/bare-bones.tmpl
guix system -n image -t iso9660 gnu/system/examples/bare-bones.tmpl
guix system -n docker-image gnu/system/examples/docker-image.tmpl
diff --git a/tests/read-print.scm b/tests/read-print.scm
index 1b0d865972..ca3f3193f7 100644
--- a/tests/read-print.scm
+++ b/tests/read-print.scm
@@ -187,6 +187,9 @@ expressions."
xyz))))")
(test-pretty-print "\
+(string-append \"a\\tb\" \"\\n\")")
+
+(test-pretty-print "\
(description \"abcdefghijkl
mnopqrstuvwxyz.\")"
#:max-width 30)