summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/guix-archive.sh9
-rw-r--r--tests/guix-build-branch.sh3
-rw-r--r--tests/guix-build.sh22
-rw-r--r--tests/guix-daemon.sh2
-rw-r--r--tests/guix-download.sh12
-rw-r--r--tests/guix-environment.sh8
-rw-r--r--tests/guix-gc.sh13
-rw-r--r--tests/guix-git-authenticate.sh5
-rw-r--r--tests/guix-graph.sh7
-rw-r--r--tests/guix-hash.sh12
-rw-r--r--tests/guix-lint.sh18
-rw-r--r--tests/guix-pack-relocatable.sh3
-rw-r--r--tests/guix-pack.sh3
-rw-r--r--tests/guix-package-aliases.sh14
-rw-r--r--tests/guix-package-net.sh9
-rw-r--r--tests/guix-package.sh45
16 files changed, 67 insertions, 118 deletions
diff --git a/tests/guix-archive.sh b/tests/guix-archive.sh
index 4c5eea05cf1..e796c62f9a3 100644
--- a/tests/guix-archive.sh
+++ b/tests/guix-archive.sh
@@ -44,8 +44,7 @@ cmp "$archive" "$archive_alt"
44# Check the exit value upon import. 44# Check the exit value upon import.
45guix archive --import < "$archive" 45guix archive --import < "$archive"
46 46
47if guix archive something-that-does-not-exist 47! guix archive something-that-does-not-exist
48then false; else true; fi
49 48
50# This one must not be listed as missing. 49# This one must not be listed as missing.
51guix build guile-bootstrap > "$archive" 50guix build guile-bootstrap > "$archive"
@@ -62,8 +61,7 @@ cmp "$archive" "$archive_alt"
62 61
63# This is not a valid store file name, so an error. 62# This is not a valid store file name, so an error.
64echo something invalid > "$archive" 63echo something invalid > "$archive"
65if guix archive --missing < "$archive" 64! guix archive --missing < "$archive"
66then false; else true; fi
67 65
68# Check '--extract'. 66# Check '--extract'.
69guile -c "(use-modules (guix serialization)) 67guile -c "(use-modules (guix serialization))
@@ -79,5 +77,4 @@ guix archive -t < "$archive" | grep "^D /share/guile"
79guix archive -t < "$archive" | grep "^x /bin/guile" 77guix archive -t < "$archive" | grep "^x /bin/guile"
80guix archive -t < "$archive" | grep "^r /share/guile.*/boot-9\.scm" 78guix archive -t < "$archive" | grep "^r /share/guile.*/boot-9\.scm"
81 79
82if echo foo | guix archive --authorize 80! echo foo | guix archive --authorize
83then false; else true; fi
diff --git a/tests/guix-build-branch.sh b/tests/guix-build-branch.sh
index c5b07e07c67..79aa06a58fb 100644
--- a/tests/guix-build-branch.sh
+++ b/tests/guix-build-branch.sh
@@ -58,5 +58,4 @@ guix gc -R "$v0_1_0_drv" | grep guile-gcrypt-8fe64e8 # this is the tag ID
58test "$v0_1_0_drv" != "$latest_drv" 58test "$v0_1_0_drv" != "$latest_drv"
59test "$v0_1_0_drv" != "$orig_drv" 59test "$v0_1_0_drv" != "$orig_drv"
60 60
61if guix build guix --with-commit=guile-gcrypt=000 -d 61! guix build guix --with-commit=guile-gcrypt=000 -d
62then false; else true; fi
diff --git a/tests/guix-build.sh b/tests/guix-build.sh
index ec2f736ccb7..6dbb53206e6 100644
--- a/tests/guix-build.sh
+++ b/tests/guix-build.sh
@@ -24,8 +24,7 @@
24guix build --version 24guix build --version
25 25
26# Should fail. 26# Should fail.
27if guix build -e +; 27! guix build -e +
28then false; else true; fi
29 28
30# Source-less packages are accepted; they just return nothing. 29# Source-less packages are accepted; they just return nothing.
31guix build -e '(@ (gnu packages bootstrap) %bootstrap-glibc)' -S 30guix build -e '(@ (gnu packages bootstrap) %bootstrap-glibc)' -S
@@ -178,7 +177,7 @@ cat > "$module_dir/foo.scm" <<EOF
178 (inputs (quasiquote (("sed" ,sed)))))) ;unbound variable 177 (inputs (quasiquote (("sed" ,sed)))))) ;unbound variable
179EOF 178EOF
180 179
181if guix build package-with-something-wrong -n; then false; else true; fi 180! guix build package-with-something-wrong -n
182guix build package-with-something-wrong -n 2> "$module_dir/err" || true 181guix build package-with-something-wrong -n 2> "$module_dir/err" || true
183grep "unbound" "$module_dir/err" # actual error 182grep "unbound" "$module_dir/err" # actual error
184grep "forget.*(gnu packages base)" "$module_dir/err" # hint 183grep "forget.*(gnu packages base)" "$module_dir/err" # hint
@@ -222,7 +221,7 @@ test "`guix build --log-file guile-bootstrap`" = "$log"
222test "`guix build --log-file $out`" = "$log" 221test "`guix build --log-file $out`" = "$log"
223 222
224# Should fail because the name/version combination could not be found. 223# Should fail because the name/version combination could not be found.
225if guix build hello-0.0.1 -n; then false; else true; fi 224! guix build hello-0.0.1 -n
226 225
227# Keep a symlink to the result, registered as a root. 226# Keep a symlink to the result, registered as a root.
228result="t-result-$$" 227result="t-result-$$"
@@ -231,8 +230,7 @@ guix build -r "$result" \
231test -x "$result/bin/guile" 230test -x "$result/bin/guile"
232 231
233# Should fail, because $result already exists. 232# Should fail, because $result already exists.
234if guix build -r "$result" -e '(@@ (gnu packages bootstrap) %bootstrap-guile)' 233! guix build -r "$result" -e '(@@ (gnu packages bootstrap) %bootstrap-guile)'
235then false; else true; fi
236 234
237rm -f "$result" 235rm -f "$result"
238 236
@@ -270,8 +268,7 @@ drv2=`guix build hello -d --with-input=gcc=gcc-toolchain`
270test "$drv1" != "$drv2" 268test "$drv1" != "$drv2"
271guix gc -R "$drv2" | grep `guix build -d gcc-toolchain` 269guix gc -R "$drv2" | grep `guix build -d gcc-toolchain`
272 270
273if guix build guile --with-input=libunistring=something-really-silly 271! guix build guile --with-input=libunistring=something-really-silly
274then false; else true; fi
275 272
276# Deprecated/superseded packages. 273# Deprecated/superseded packages.
277test "`guix build superseded -d`" = "`guix build bar -d`" 274test "`guix build superseded -d`" = "`guix build bar -d`"
@@ -279,10 +276,8 @@ test "`guix build superseded -d`" = "`guix build bar -d`"
279# Parsing package names and versions. 276# Parsing package names and versions.
280guix build -n time # PASS 277guix build -n time # PASS
281guix build -n time@1.9 # PASS, version found 278guix build -n time@1.9 # PASS, version found
282if guix build -n time@3.2; # FAIL, version not found 279! guix build -n time@3.2 # FAIL, version not found
283then false; else true; fi 280! guix build -n something-that-will-never-exist # FAIL
284if guix build -n something-that-will-never-exist; # FAIL
285then false; else true; fi
286 281
287# Invoking a monadic procedure. 282# Invoking a monadic procedure.
288guix build -e "(begin 283guix build -e "(begin
@@ -354,5 +349,4 @@ export GUIX_BUILD_OPTIONS
354guix build emacs 349guix build emacs
355 350
356GUIX_BUILD_OPTIONS="--something-completely-crazy" 351GUIX_BUILD_OPTIONS="--something-completely-crazy"
357if guix build emacs; 352! guix build emacs
358then false; else true; fi
diff --git a/tests/guix-daemon.sh b/tests/guix-daemon.sh
index b58500966b3..330ad688350 100644
--- a/tests/guix-daemon.sh
+++ b/tests/guix-daemon.sh
@@ -224,7 +224,7 @@ daemon_pid=$!
224GUIX_DAEMON_SOCKET="guix://$tcp_socket" 224GUIX_DAEMON_SOCKET="guix://$tcp_socket"
225export GUIX_DAEMON_SOCKET 225export GUIX_DAEMON_SOCKET
226 226
227if guix gc; then false; else true; fi 227! guix gc
228 228
229unset GUIX_DAEMON_SOCKET 229unset GUIX_DAEMON_SOCKET
230kill "$daemon_pid" 230kill "$daemon_pid"
diff --git a/tests/guix-download.sh b/tests/guix-download.sh
index 30f55fbe2bd..5475d43e606 100644
--- a/tests/guix-download.sh
+++ b/tests/guix-download.sh
@@ -23,14 +23,11 @@
23guix download --version 23guix download --version
24 24
25# Make sure it fails here. 25# Make sure it fails here.
26if guix download http://does.not/exist 26! guix download http://does.not/exist
27then false; else true; fi
28 27
29if guix download unknown://some/where; 28! guix download unknown://some/where;
30then false; else true; fi
31 29
32if guix download /does-not-exist 30! guix download /does-not-exist
33then false; else true; fi
34 31
35# This one should succeed. 32# This one should succeed.
36guix download "file://$abs_top_srcdir/README" 33guix download "file://$abs_top_srcdir/README"
@@ -46,5 +43,4 @@ GUIX_DAEMON_SOCKET="/nowhere" guix download -o "$output" \
46cmp "$output" "$abs_top_srcdir/README" 43cmp "$output" "$abs_top_srcdir/README"
47 44
48# This one should fail. 45# This one should fail.
49if guix download "file:///does-not-exist" "file://$abs_top_srcdir/README" 46! guix download "file:///does-not-exist" "file://$abs_top_srcdir/README"
50then false; else true; fi
diff --git a/tests/guix-environment.sh b/tests/guix-environment.sh
index 2faf38df06a..f8be48f0c0a 100644
--- a/tests/guix-environment.sh
+++ b/tests/guix-environment.sh
@@ -60,7 +60,7 @@ guix environment --bootstrap --ad-hoc guile-bootstrap --pure \
60grep '^PATH=' "$tmpdir/a" 60grep '^PATH=' "$tmpdir/a"
61grep '^GUIX_TEST_ABC=' "$tmpdir/a" 61grep '^GUIX_TEST_ABC=' "$tmpdir/a"
62grep '^GUIX_TEST_DEF=' "$tmpdir/a" 62grep '^GUIX_TEST_DEF=' "$tmpdir/a"
63if grep '^GUIX_TEST_XYZ=' "$tmpdir/a"; then false; else true; fi 63! grep '^GUIX_TEST_XYZ=' "$tmpdir/a"
64 64
65# Make sure the exit value is preserved. 65# Make sure the exit value is preserved.
66if guix environment --bootstrap --ad-hoc guile-bootstrap --pure \ 66if guix environment --bootstrap --ad-hoc guile-bootstrap --pure \
@@ -194,8 +194,7 @@ then
194 done 194 done
195 195
196 # 'make-boot0' itself must not be listed. 196 # 'make-boot0' itself must not be listed.
197 if guix gc --references "$profile" | grep make-boot0 197 ! guix gc --references "$profile" | grep make-boot0
198 then false; else true; fi
199 198
200 # Make sure that the shell spawned with '--exec' sees the same environment 199 # Make sure that the shell spawned with '--exec' sees the same environment
201 # as returned by '--search-paths'. 200 # as returned by '--search-paths'.
@@ -212,8 +211,7 @@ then
212 test "x$make_boot0_debug" != "x" 211 test "x$make_boot0_debug" != "x"
213 212
214 # Make sure the "debug" output is not listed. 213 # Make sure the "debug" output is not listed.
215 if guix gc --references "$profile" | grep "$make_boot0_debug" 214 ! guix gc --references "$profile" | grep "$make_boot0_debug"
216 then false; else true; fi
217 215
218 # Compute the build environment for the initial GNU Make, but add in the 216 # Compute the build environment for the initial GNU Make, but add in the
219 # bootstrap Guile as an ad-hoc addition. 217 # bootstrap Guile as an ad-hoc addition.
diff --git a/tests/guix-gc.sh b/tests/guix-gc.sh
index 8284287730f..f40619876d4 100644
--- a/tests/guix-gc.sh
+++ b/tests/guix-gc.sh
@@ -36,11 +36,11 @@ unset out
36# For some operations, passing extra arguments is an error. 36# For some operations, passing extra arguments is an error.
37for option in "" "-C 500M" "--verify" "--optimize" "--list-roots" 37for option in "" "-C 500M" "--verify" "--optimize" "--list-roots"
38do 38do
39 if guix gc $option whatever; then false; else true; fi 39 ! guix gc $option whatever
40done 40done
41 41
42# This should fail. 42# This should fail.
43if guix gc --verify=foo; then false; else true; fi 43! guix gc --verify=foo
44 44
45# Check the references of a .drv. 45# Check the references of a .drv.
46drv="`guix build guile-bootstrap -d`" 46drv="`guix build guile-bootstrap -d`"
@@ -51,8 +51,7 @@ guix gc --references "$drv" | grep -e -bash
51guix gc --references "$out" 51guix gc --references "$out"
52guix gc --references "$out/bin/guile" 52guix gc --references "$out/bin/guile"
53 53
54if guix gc --references /dev/null; 54! guix gc --references /dev/null;
55then false; else true; fi
56 55
57# Check derivers. 56# Check derivers.
58guix gc --derivers "$out" | grep "$drv" 57guix gc --derivers "$out" | grep "$drv"
@@ -72,8 +71,7 @@ test -f "$drv" && test -L guix-gc-root
72guix gc --list-roots | grep "$PWD/guix-gc-root" 71guix gc --list-roots | grep "$PWD/guix-gc-root"
73 72
74guix gc --list-live | grep "$drv" 73guix gc --list-live | grep "$drv"
75if guix gc --delete "$drv"; 74! guix gc --delete "$drv";
76then false; else true; fi
77 75
78rm guix-gc-root 76rm guix-gc-root
79guix gc --list-dead | grep "$drv" 77guix gc --list-dead | grep "$drv"
@@ -84,8 +82,7 @@ guix gc --delete "$drv"
84guix gc -C 1KiB 82guix gc -C 1KiB
85 83
86# Check trivial error cases. 84# Check trivial error cases.
87if guix gc --delete /dev/null; 85! guix gc --delete /dev/null;
88then false; else true; fi
89 86
90# Bug #19757 87# Bug #19757
91out="`guix build guile-bootstrap`" 88out="`guix build guile-bootstrap`"
diff --git a/tests/guix-git-authenticate.sh b/tests/guix-git-authenticate.sh
index 1c76e240b54..8ebbea398b6 100644
--- a/tests/guix-git-authenticate.sh
+++ b/tests/guix-git-authenticate.sh
@@ -46,9 +46,8 @@ v1_0_0_signer="3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5" # civodul
46v1_0_1_commit="d68de958b60426798ed62797ff7c96c327a672ac" 46v1_0_1_commit="d68de958b60426798ed62797ff7c96c327a672ac"
47 47
48# This should fail because these commits lack '.guix-authorizations'. 48# This should fail because these commits lack '.guix-authorizations'.
49if guix git authenticate "$v1_0_0_commit" "$v1_0_0_signer" \ 49! guix git authenticate "$v1_0_0_commit" "$v1_0_0_signer" \
50 --cache-key="$cache_key" --end="$v1_0_1_commit"; 50 --cache-key="$cache_key" --end="$v1_0_1_commit"
51then false; else true; fi
52 51
53# This should work thanks to '--historical-authorizations'. 52# This should work thanks to '--historical-authorizations'.
54guix git authenticate "$v1_0_0_commit" "$v1_0_0_signer" \ 53guix git authenticate "$v1_0_0_commit" "$v1_0_0_signer" \
diff --git a/tests/guix-graph.sh b/tests/guix-graph.sh
index ccb4933c882..666660ab4b4 100644
--- a/tests/guix-graph.sh
+++ b/tests/guix-graph.sh
@@ -60,7 +60,7 @@ guix graph -t references guile-bootstrap | grep guile-bootstrap
60guix graph -e '(@ (gnu packages bootstrap) %bootstrap-guile)' \ 60guix graph -e '(@ (gnu packages bootstrap) %bootstrap-guile)' \
61 | grep guile-bootstrap 61 | grep guile-bootstrap
62 62
63if guix graph -e +; then false; else true; fi 63! guix graph -e +
64 64
65# Try passing store file names. 65# Try passing store file names.
66 66
@@ -77,14 +77,13 @@ cmp "$tmpfile1" "$tmpfile2"
77# Try package transformation options. 77# Try package transformation options.
78guix graph git | grep 'label = "openssl' 78guix graph git | grep 'label = "openssl'
79guix graph git --with-input=openssl=libressl | grep 'label = "libressl' 79guix graph git --with-input=openssl=libressl | grep 'label = "libressl'
80if guix graph git --with-input=openssl=libressl | grep 'label = "openssl' 80! guix graph git --with-input=openssl=libressl | grep 'label = "openssl'
81then false; else true; fi
82 81
83# Try --load-path 82# Try --load-path
84guix graph -L $module_dir dummy | grep 'label = "dummy' 83guix graph -L $module_dir dummy | grep 'label = "dummy'
85 84
86# Displaying shortest paths (or lack thereof). 85# Displaying shortest paths (or lack thereof).
87if guix graph --path emacs vim; then false; else true; fi 86! guix graph --path emacs vim
88 87
89path="\ 88path="\
90emacs 89emacs
diff --git a/tests/guix-hash.sh b/tests/guix-hash.sh
index 3538b9aeda4..346355539fc 100644
--- a/tests/guix-hash.sh
+++ b/tests/guix-hash.sh
@@ -34,8 +34,7 @@ test `guix hash -f base32 /dev/null` = 4oymiquy7qobjgx36tejs35zeqt24qpemsnzgtfes
34test `guix hash -H sha512 -f hex /dev/null` = cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e 34test `guix hash -H sha512 -f hex /dev/null` = cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
35test `guix hash -H sha1 -f base64 /dev/null` = "2jmj7l5rSw0yVb/vlWAYkK/YBwk=" 35test `guix hash -H sha1 -f base64 /dev/null` = "2jmj7l5rSw0yVb/vlWAYkK/YBwk="
36 36
37if guix hash -H abcd1234 /dev/null; 37! guix hash -H abcd1234 /dev/null
38then false; else true; fi
39 38
40mkdir "$tmpdir" 39mkdir "$tmpdir"
41echo -n executable > "$tmpdir/exe" 40echo -n executable > "$tmpdir/exe"
@@ -46,13 +45,11 @@ mkdir "$tmpdir/subdir"
46test `guix hash -r "$tmpdir"` = 10k1lw41wyrjf9mxydi0is5nkpynlsvgslinics4ppir13g7d74p 45test `guix hash -r "$tmpdir"` = 10k1lw41wyrjf9mxydi0is5nkpynlsvgslinics4ppir13g7d74p
47 46
48# Without '-r', this should fail. 47# Without '-r', this should fail.
49if guix hash "$tmpdir" 48! guix hash "$tmpdir"
50then false; else true; fi
51 49
52# This should fail because /dev/null is a character device, which 50# This should fail because /dev/null is a character device, which
53# the archive format doesn't support. 51# the archive format doesn't support.
54if guix hash -r /dev/null 52! guix hash -r /dev/null
55then false; else true; fi
56 53
57# Adding a .git directory 54# Adding a .git directory
58mkdir "$tmpdir/.git" 55mkdir "$tmpdir/.git"
@@ -65,6 +62,5 @@ test `guix hash -r $tmpdir` = 0a50z04zyzf7pidwxv0nwbj82pgzbrhdy9562kncnvkcfvb48m
65test `guix hash -r $tmpdir -x` = 10k1lw41wyrjf9mxydi0is5nkpynlsvgslinics4ppir13g7d74p 62test `guix hash -r $tmpdir -x` = 10k1lw41wyrjf9mxydi0is5nkpynlsvgslinics4ppir13g7d74p
66 63
67# Without '-r', this should fail. 64# Without '-r', this should fail.
68if guix hash "$tmpdir" 65! guix hash "$tmpdir"
69then false; else true; fi
70 66
diff --git a/tests/guix-lint.sh b/tests/guix-lint.sh
index ebe79efb84b..fdf548fbf18 100644
--- a/tests/guix-lint.sh
+++ b/tests/guix-lint.sh
@@ -58,24 +58,19 @@ grep_warning ()
58# 3) the description has a single space following the end-of-sentence period. 58# 3) the description has a single space following the end-of-sentence period.
59 59
60out=`guix lint -c synopsis,description dummy 2>&1` 60out=`guix lint -c synopsis,description dummy 2>&1`
61if [ `grep_warning "$out"` -ne 3 ] 61test `grep_warning "$out"` -eq 3
62then false; else true; fi
63 62
64out=`guix lint -c synopsis dummy 2>&1` 63out=`guix lint -c synopsis dummy 2>&1`
65if [ `grep_warning "$out"` -ne 2 ] 64test `grep_warning "$out"` -eq 2
66then false; else true; fi
67 65
68out=`guix lint -c description dummy 2>&1` 66out=`guix lint -c description dummy 2>&1`
69if [ `grep_warning "$out"` -ne 1 ] 67test `grep_warning "$out"` -eq 1
70then false; else true; fi
71 68
72out=`guix lint -c description,synopsis dummy 2>&1` 69out=`guix lint -c description,synopsis dummy 2>&1`
73if [ `grep_warning "$out"` -ne 3 ] 70test `grep_warning "$out"` -eq 3
74then false; else true; fi
75 71
76if guix lint -c synopsis,invalid-checker dummy 2>&1 | \ 72guix lint -c synopsis,invalid-checker dummy 2>&1 | \
77 grep -q 'invalid-checker: invalid checker' 73 grep -q 'invalid-checker: invalid checker'
78then true; else false; fi
79 74
80# Make sure specifying multiple packages works. 75# Make sure specifying multiple packages works.
81guix lint -c inputs-should-be-native dummy dummy@42 dummy 76guix lint -c inputs-should-be-native dummy dummy@42 dummy
@@ -85,8 +80,7 @@ guix lint -c inputs-should-be-native dummy dummy@42 dummy
85unset GUIX_PACKAGE_PATH 80unset GUIX_PACKAGE_PATH
86 81
87out=`guix lint -L $module_dir -c synopsis,description dummy 2>&1` 82out=`guix lint -L $module_dir -c synopsis,description dummy 2>&1`
88if [ `grep_warning "$out"` -ne 3 ] 83test `grep_warning "$out"` -eq 3
89then false; else true; fi
90 84
91# Make sure specifying multiple packages works. 85# Make sure specifying multiple packages works.
92guix lint -L $module_dir -c inputs-should-be-native dummy dummy@42 dummy 86guix lint -L $module_dir -c inputs-should-be-native dummy dummy@42 dummy
diff --git a/tests/guix-pack-relocatable.sh b/tests/guix-pack-relocatable.sh
index b8d36a02c6c..a960ecd209c 100644
--- a/tests/guix-pack-relocatable.sh
+++ b/tests/guix-pack-relocatable.sh
@@ -77,8 +77,7 @@ then
77 grep 'GNU sed' "$test_directory/output" 77 grep 'GNU sed' "$test_directory/output"
78 78
79 # Check whether the exit code is preserved. 79 # Check whether the exit code is preserved.
80 if run_without_store "$test_directory/Bin/sed" --does-not-exist; 80 ! run_without_store "$test_directory/Bin/sed" --does-not-exist
81 then false; else true; fi
82 81
83 chmod -Rf +w "$test_directory"; rm -rf "$test_directory"/* 82 chmod -Rf +w "$test_directory"; rm -rf "$test_directory"/*
84else 83else
diff --git a/tests/guix-pack.sh b/tests/guix-pack.sh
index 39b64791e2a..0339221ac25 100644
--- a/tests/guix-pack.sh
+++ b/tests/guix-pack.sh
@@ -45,8 +45,7 @@ guix gc -R "$drv" | grep "`guix build coreutils -d --no-grafts`"
45drv="`guix pack idutils -d --no-grafts --target=arm-linux-gnueabihf`" 45drv="`guix pack idutils -d --no-grafts --target=arm-linux-gnueabihf`"
46guix gc -R "$drv" | \ 46guix gc -R "$drv" | \
47 grep "`guix build idutils --target=arm-linux-gnueabihf -d --no-grafts`" 47 grep "`guix build idutils --target=arm-linux-gnueabihf -d --no-grafts`"
48if guix gc -R "$drv" | grep "`guix build idutils -d --no-grafts`"; 48! guix gc -R "$drv" | grep "`guix build idutils -d --no-grafts`"
49then false; else true; fi
50 49
51# Build a tarball with no compression. 50# Build a tarball with no compression.
52guix pack --compression=none --bootstrap guile-bootstrap 51guix pack --compression=none --bootstrap guile-bootstrap
diff --git a/tests/guix-package-aliases.sh b/tests/guix-package-aliases.sh
index e24bff3a560..e4ddace0573 100644
--- a/tests/guix-package-aliases.sh
+++ b/tests/guix-package-aliases.sh
@@ -36,26 +36,22 @@ guix install --bootstrap guile-bootstrap -p "$profile"
36test -x "$profile/bin/guile" 36test -x "$profile/bin/guile"
37 37
38# Make sure '-r' isn't passed as-is to 'guix package'. 38# Make sure '-r' isn't passed as-is to 'guix package'.
39if guix install -r guile-bootstrap -p "$profile" --bootstrap 39! guix install -r guile-bootstrap -p "$profile" --bootstrap
40then false; else true; fi
41test -x "$profile/bin/guile" 40test -x "$profile/bin/guile"
42 41
43guix upgrade --version 42guix upgrade --version
44guix upgrade -n 43guix upgrade -n
45guix upgrade gui.e -n 44guix upgrade gui.e -n
46if guix upgrade foo bar -n; 45! guix upgrade foo bar -n;
47then false; else true; fi
48 46
49guix remove --version 47guix remove --version
50guix remove --bootstrap guile-bootstrap -p "$profile" 48guix remove --bootstrap guile-bootstrap -p "$profile"
51! test -x "$profile/bin/guile" 49! test -x "$profile/bin/guile"
52test `guix package -p "$profile" -I | wc -l` -eq 0 50test `guix package -p "$profile" -I | wc -l` -eq 0
53 51
54if guix remove -p "$profile" this-is-not-installed --bootstrap 52! guix remove -p "$profile" this-is-not-installed --bootstrap
55then false; else true; fi
56 53
57if guix remove -i guile-bootstrap -p "$profile" --bootstrap 54! guix remove -i guile-bootstrap -p "$profile" --bootstrap
58then false; else true; fi
59 55
60guix search '\<board\>' game | grep '^name: gnubg' 56guix search '\<board\>' game | grep '^name: gnubg'
61 57
@@ -64,7 +60,7 @@ guix show guile
64guix show python@3 | grep "^name: python" 60guix show python@3 | grep "^name: python"
65 61
66# "python@2" exists but is deprecated; make sure it doesn't show up. 62# "python@2" exists but is deprecated; make sure it doesn't show up.
67if guix show python@2; then false; else true; fi 63! guix show python@2
68 64
69# Specifying multiple packages. 65# Specifying multiple packages.
70output="`guix show sed grep | grep ^name:`" 66output="`guix show sed grep | grep ^name:`"
diff --git a/tests/guix-package-net.sh b/tests/guix-package-net.sh
index 3876701fa21..6d21c6cff6a 100644
--- a/tests/guix-package-net.sh
+++ b/tests/guix-package-net.sh
@@ -95,10 +95,8 @@ test "`guix package -p "$profile" -l | cut -f1 | grep guile | head -n1`" \
95 = " guile-bootstrap" 95 = " guile-bootstrap"
96 96
97# Exit with 1 when a generation does not exist. 97# Exit with 1 when a generation does not exist.
98if guix package -p "$profile" --list-generations=42; 98! guix package -p "$profile" --list-generations=42
99then false; else true; fi 99! guix package -p "$profile" --switch-generation=99
100if guix package -p "$profile" --switch-generation=99;
101then false; else true; fi
102 100
103# Remove a package. 101# Remove a package.
104guix package --bootstrap -p "$profile" -r "guile-bootstrap" 102guix package --bootstrap -p "$profile" -r "guile-bootstrap"
@@ -174,8 +172,7 @@ test -z "`guix package -p "$profile" -l 3`"
174rm "$profile" 172rm "$profile"
175guix package --bootstrap -p "$profile" -i guile-bootstrap 173guix package --bootstrap -p "$profile" -i guile-bootstrap
176guix package --bootstrap -p "$profile_alt" -i gcc-bootstrap 174guix package --bootstrap -p "$profile_alt" -i gcc-bootstrap
177if guix package -p "$profile" --search-paths | grep LIBRARY_PATH 175! guix package -p "$profile" --search-paths | grep LIBRARY_PATH
178then false; fi
179guix package -p "$profile" -p "$profile_alt" --search-paths \ 176guix package -p "$profile" -p "$profile_alt" --search-paths \
180 | grep "LIBRARY_PATH.*$profile/lib.$profile_alt/lib" 177 | grep "LIBRARY_PATH.*$profile/lib.$profile_alt/lib"
181 178
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index 1f955257be2..1a95b8e9a4a 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -36,8 +36,7 @@ rm -f "$profile" "$tmpfile"
36trap 'rm -f "$profile" "$profile.lock" "$profile-"[0-9]* "$tmpfile"; rm -rf "$module_dir" t-home-'"$$" EXIT 36trap 'rm -f "$profile" "$profile.lock" "$profile-"[0-9]* "$tmpfile"; rm -rf "$module_dir" t-home-'"$$" EXIT
37 37
38# Use `-e' with a non-package expression. 38# Use `-e' with a non-package expression.
39if guix package --bootstrap -e +; 39! guix package --bootstrap -e +
40then false; else true; fi
41 40
42# Install a store item and make sure the version and output in the manifest 41# Install a store item and make sure the version and output in the manifest
43# are correct. 42# are correct.
@@ -62,8 +61,7 @@ test -f "$profile/bin/guile"
62 61
63# Collisions are properly flagged (in this case, 'g-wrap' propagates 62# Collisions are properly flagged (in this case, 'g-wrap' propagates
64# guile@2.2, which conflicts with guile@2.0.) 63# guile@2.2, which conflicts with guile@2.0.)
65if guix package --bootstrap -n -p "$profile" -i g-wrap guile@2.0 64! guix package --bootstrap -n -p "$profile" -i g-wrap guile@2.0
66then false; else true; fi
67 65
68guix package --bootstrap -n -p "$profile" -i g-wrap guile@2.0 \ 66guix package --bootstrap -n -p "$profile" -i g-wrap guile@2.0 \
69 --allow-collisions 67 --allow-collisions
@@ -78,8 +76,7 @@ test "`guix package -p "$profile" --search-paths | wc -l`" = 1 # $PATH
78 type -P rm ) 76 type -P rm )
79 77
80# Exit with 1 when a generation does not exist. 78# Exit with 1 when a generation does not exist.
81if guix package -p "$profile" --delete-generations=42; 79! guix package -p "$profile" --delete-generations=42
82then false; else true; fi
83 80
84# Exit with 0 when trying to delete the zeroth generation. 81# Exit with 0 when trying to delete the zeroth generation.
85guix package -p "$profile" --delete-generations=0 82guix package -p "$profile" --delete-generations=0
@@ -92,15 +89,12 @@ guix package --bootstrap -i "glibc:debug" -p "$profile" -n
92 89
93# Make sure nonexistent outputs are reported. 90# Make sure nonexistent outputs are reported.
94guix package --bootstrap -i "guile-bootstrap:out" -p "$profile" -n 91guix package --bootstrap -i "guile-bootstrap:out" -p "$profile" -n
95if guix package --bootstrap -i "guile-bootstrap:does-not-exist" -p "$profile" -n; 92! guix package --bootstrap -i "guile-bootstrap:does-not-exist" -p "$profile" -n
96then false; else true; fi 93! guix package --bootstrap -i "guile-bootstrap:does-not-exist" -p "$profile"
97if guix package --bootstrap -i "guile-bootstrap:does-not-exist" -p "$profile";
98then false; else true; fi
99 94
100# Make sure we get an error when trying to remove something that's not 95# Make sure we get an error when trying to remove something that's not
101# installed. 96# installed.
102if guix package --bootstrap -r something-not-installed -p "$profile"; 97! guix package --bootstrap -r something-not-installed -p "$profile"
103then false; else true; fi
104 98
105# Check whether `--list-available' returns something sensible. 99# Check whether `--list-available' returns something sensible.
106guix package -p "$profile" -A 'gui.*e' | grep guile 100guix package -p "$profile" -A 'gui.*e' | grep guile
@@ -112,8 +106,8 @@ guix package --show=guile | grep "^name: guile"
112guix package --show=texlive 106guix package --show=texlive
113 107
114# Fail for non-existent packages or package/version pairs. 108# Fail for non-existent packages or package/version pairs.
115if guix package --show=does-not-exist; then false; else true; fi 109! guix package --show=does-not-exist
116if guix package --show=emacs@42; then false; else true; fi 110! guix package --show=emacs@42
117 111
118# Search. 112# Search.
119LC_MESSAGES=C 113LC_MESSAGES=C
@@ -157,22 +151,19 @@ guix package --search="" > /dev/null
157# There's no generation older than 12 months, so the following command should 151# There's no generation older than 12 months, so the following command should
158# have no effect. 152# have no effect.
159generation="`readlink_base "$profile"`" 153generation="`readlink_base "$profile"`"
160if guix package -p "$profile" --delete-generations=12m; 154! guix package -p "$profile" --delete-generations=12m
161then false; else true; fi
162test "`readlink_base "$profile"`" = "$generation" 155test "`readlink_base "$profile"`" = "$generation"
163 156
164# The following command should not delete the current generation, even though 157# The following command should not delete the current generation, even though
165# it matches the given pattern (see <http://bugs.gnu.org/19978>.) And since 158# it matches the given pattern (see <http://bugs.gnu.org/19978>.) And since
166# there's nothing else to delete, it should just fail. 159# there's nothing else to delete, it should just fail.
167guix package --list-generations -p "$profile" 160guix package --list-generations -p "$profile"
168if guix package --bootstrap -p "$profile" --delete-generations=1.. 161! guix package --bootstrap -p "$profile" --delete-generations=1..
169then false; else true; fi
170test "`readlink_base "$profile"`" = "$generation" 162test "`readlink_base "$profile"`" = "$generation"
171 163
172# Make sure $profile is a GC root at this point. 164# Make sure $profile is a GC root at this point.
173real_profile="`readlink -f "$profile"`" 165real_profile="`readlink -f "$profile"`"
174if guix gc -d "$real_profile" 166! guix gc -d "$real_profile"
175then false; else true; fi
176test -d "$real_profile" 167test -d "$real_profile"
177 168
178# Now, let's remove all the symlinks to $real_profile, and make sure 169# Now, let's remove all the symlinks to $real_profile, and make sure
@@ -238,16 +229,15 @@ done
238 229
239# Check whether '-p ~/.guix-profile' makes any difference. 230# Check whether '-p ~/.guix-profile' makes any difference.
240# See <http://bugs.gnu.org/17939>. 231# See <http://bugs.gnu.org/17939>.
241if test -e "$HOME/.guix-profile-0-link"; then false; fi 232! test -e "$HOME/.guix-profile-0-link"
242if test -e "$HOME/.guix-profile-1-link"; then false; fi 233! test -e "$HOME/.guix-profile-1-link"
243guix package --bootstrap -p "$HOME/.guix-profile" -i guile-bootstrap 234guix package --bootstrap -p "$HOME/.guix-profile" -i guile-bootstrap
244if test -e "$HOME/.guix-profile-1-link"; then false; fi 235! test -e "$HOME/.guix-profile-1-link"
245guix package --bootstrap --roll-back -p "$HOME/.guix-profile" 236guix package --bootstrap --roll-back -p "$HOME/.guix-profile"
246if test -e "$HOME/.guix-profile-0-link"; then false; fi 237! test -e "$HOME/.guix-profile-0-link"
247 238
248# Extraneous argument. 239# Extraneous argument.
249if guix package install foo-bar; 240! guix package install foo-bar
250then false; else true; fi
251 241
252# Make sure the "broken pipe" doesn't yield an error. 242# Make sure the "broken pipe" doesn't yield an error.
253# Note: 'pipefail' is a Bash-specific option. 243# Note: 'pipefail' is a Bash-specific option.
@@ -336,8 +326,7 @@ cat > "$module_dir/package.scm"<<EOF
336 326
337(define my-package coreutils) ;returns *unspecified* 327(define my-package coreutils) ;returns *unspecified*
338EOF 328EOF
339if guix package --bootstrap --install-from-file="$module_dir/package.scm" 329! guix package --bootstrap --install-from-file="$module_dir/package.scm"
340then false; else true; fi
341 330
342rm "$module_dir/package.scm" 331rm "$module_dir/package.scm"
343 332