diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/guix-build.sh | 4 | ||||
-rw-r--r-- | tests/guix-graph.sh | 8 | ||||
-rw-r--r-- | tests/guix-package.sh | 10 | ||||
-rw-r--r-- | tests/networking.scm | 19 |
4 files changed, 30 insertions, 11 deletions
diff --git a/tests/guix-build.sh b/tests/guix-build.sh index 37666ffd01..52feda9d3a 100644 --- a/tests/guix-build.sh +++ b/tests/guix-build.sh @@ -226,6 +226,10 @@ rmdir "$result" # Cross building. guix build coreutils --target=mips64el-linux-gnu --dry-run --no-substitutes +# Likewise, but with '-e' (see <https://bugs.gnu.org/38093>). +guix build --target=arm-linux-gnueabihf --dry-run \ + -e '(@ (gnu packages base) coreutils)' + # Replacements. drv1=`guix build guix --with-input=guile@2.0=guile@2.2 -d` drv2=`guix build guix -d` diff --git a/tests/guix-graph.sh b/tests/guix-graph.sh index 1ec99706fd..2d4b3fac3f 100644 --- a/tests/guix-graph.sh +++ b/tests/guix-graph.sh @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org> +# Copyright © 2015, 2016, 2019 Ludovic Courtès <ludo@gnu.org> # # This file is part of GNU Guix. # @@ -53,3 +53,9 @@ cmp "$tmpfile1" "$tmpfile2" guix graph -t derivation coreutils > "$tmpfile1" guix graph -t derivation `guix build -d coreutils` > "$tmpfile2" cmp "$tmpfile1" "$tmpfile2" + +# Try package transformation options. +guix graph git | grep 'label = "openssl' +guix graph git --with-input=openssl=libressl | grep 'label = "libressl' +if guix graph git --with-input=openssl=libressl | grep 'label = "openssl' +then false; else true; fi diff --git a/tests/guix-package.sh b/tests/guix-package.sh index 0de30bf6c1..7ad0699380 100644 --- a/tests/guix-package.sh +++ b/tests/guix-package.sh @@ -33,7 +33,7 @@ profile="t-profile-$$" tmpfile="t-guix-package-file-$$" rm -f "$profile" "$tmpfile" -trap 'rm -f "$profile" "$profile-"[0-9]* "$tmpfile"; rm -rf "$module_dir" t-home-'"$$" EXIT +trap 'rm -f "$profile" "$profile.lock" "$profile-"[0-9]* "$tmpfile"; rm -rf "$module_dir" t-home-'"$$" EXIT # Use `-e' with a non-package expression. if guix package --bootstrap -e +; @@ -452,3 +452,11 @@ rm -rf "$module_dir" # Make sure we can see user profiles. guix package --list-profiles | grep "$profile" guix package --list-profiles | grep '\.guix-profile' + +# Make sure we can properly lock a profile. +mkdir "$module_dir" +echo '(sleep 60)' > "$module_dir/manifest.scm" +guix package -m "$module_dir/manifest.scm" -p "$module_dir/profile" & +pid=$! +if guix install emacs -p "$module_dir/profile"; then kill $pid; false; else true; fi +kill $pid diff --git a/tests/networking.scm b/tests/networking.scm index 439cca5ffc..c494a48067 100644 --- a/tests/networking.scm +++ b/tests/networking.scm @@ -36,22 +36,23 @@ (ntp-server (type 'server) (address "some.ntp.server.org") - (options `(iburst (version 3) (maxpoll 16) prefer)))) + ;; Using either strings or symbols for option names is accepted. + (options `("iburst" (version 3) (maxpoll 16) prefer)))) (test-equal "ntp-server->string" - (ntp-server->string %ntp-server-sample) - "server some.ntp.server.org iburst version 3 maxpoll 16 prefer") + "server some.ntp.server.org iburst version 3 maxpoll 16 prefer" + (ntp-server->string %ntp-server-sample)) (test-equal "ntp configuration servers deprecated form" (ntp-configuration-servers (ntp-configuration + (servers (list "example.pool.ntp.org")))) + (ntp-configuration-servers + (ntp-configuration (servers (list (ntp-server (type 'server) (address "example.pool.ntp.org") - (options '())))))) - (ntp-configuration-servers - (ntp-configuration - (servers (list "example.pool.ntp.org"))))) + (options '()))))))) ;;; @@ -106,8 +107,8 @@ the sanity check:\n~a~%" config) #t)))) (test-equal "openntpd generated config string ends with a newline" + "\n" (let ((config (openntpd-configuration->string %openntpd-conf-sample))) - (string-take-right config 1)) - "\n") + (string-take-right config 1))) (test-end "networking") |