diff options
| -rw-r--r-- | tests/guix-archive.sh | 9 | ||||
| -rw-r--r-- | tests/guix-build-branch.sh | 3 | ||||
| -rw-r--r-- | tests/guix-build.sh | 22 | ||||
| -rw-r--r-- | tests/guix-daemon.sh | 2 | ||||
| -rw-r--r-- | tests/guix-download.sh | 12 | ||||
| -rw-r--r-- | tests/guix-environment.sh | 8 | ||||
| -rw-r--r-- | tests/guix-gc.sh | 13 | ||||
| -rw-r--r-- | tests/guix-git-authenticate.sh | 5 | ||||
| -rw-r--r-- | tests/guix-graph.sh | 7 | ||||
| -rw-r--r-- | tests/guix-hash.sh | 12 | ||||
| -rw-r--r-- | tests/guix-lint.sh | 18 | ||||
| -rw-r--r-- | tests/guix-pack-relocatable.sh | 3 | ||||
| -rw-r--r-- | tests/guix-pack.sh | 3 | ||||
| -rw-r--r-- | tests/guix-package-aliases.sh | 14 | ||||
| -rw-r--r-- | tests/guix-package-net.sh | 9 | ||||
| -rw-r--r-- | tests/guix-package.sh | 45 |
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. |
| 45 | guix archive --import < "$archive" | 45 | guix archive --import < "$archive" |
| 46 | 46 | ||
| 47 | if guix archive something-that-does-not-exist | 47 | ! guix archive something-that-does-not-exist |
| 48 | then false; else true; fi | ||
| 49 | 48 | ||
| 50 | # This one must not be listed as missing. | 49 | # This one must not be listed as missing. |
| 51 | guix build guile-bootstrap > "$archive" | 50 | guix 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. |
| 64 | echo something invalid > "$archive" | 63 | echo something invalid > "$archive" |
| 65 | if guix archive --missing < "$archive" | 64 | ! guix archive --missing < "$archive" |
| 66 | then false; else true; fi | ||
| 67 | 65 | ||
| 68 | # Check '--extract'. | 66 | # Check '--extract'. |
| 69 | guile -c "(use-modules (guix serialization)) | 67 | guile -c "(use-modules (guix serialization)) |
| @@ -79,5 +77,4 @@ guix archive -t < "$archive" | grep "^D /share/guile" | |||
| 79 | guix archive -t < "$archive" | grep "^x /bin/guile" | 77 | guix archive -t < "$archive" | grep "^x /bin/guile" |
| 80 | guix archive -t < "$archive" | grep "^r /share/guile.*/boot-9\.scm" | 78 | guix archive -t < "$archive" | grep "^r /share/guile.*/boot-9\.scm" |
| 81 | 79 | ||
| 82 | if echo foo | guix archive --authorize | 80 | ! echo foo | guix archive --authorize |
| 83 | then 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 | |||
| 58 | test "$v0_1_0_drv" != "$latest_drv" | 58 | test "$v0_1_0_drv" != "$latest_drv" |
| 59 | test "$v0_1_0_drv" != "$orig_drv" | 59 | test "$v0_1_0_drv" != "$orig_drv" |
| 60 | 60 | ||
| 61 | if guix build guix --with-commit=guile-gcrypt=000 -d | 61 | ! guix build guix --with-commit=guile-gcrypt=000 -d |
| 62 | then 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 @@ | |||
| 24 | guix build --version | 24 | guix build --version |
| 25 | 25 | ||
| 26 | # Should fail. | 26 | # Should fail. |
| 27 | if guix build -e +; | 27 | ! guix build -e + |
| 28 | then 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. |
| 31 | guix build -e '(@ (gnu packages bootstrap) %bootstrap-glibc)' -S | 30 | guix 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 |
| 179 | EOF | 178 | EOF |
| 180 | 179 | ||
| 181 | if guix build package-with-something-wrong -n; then false; else true; fi | 180 | ! guix build package-with-something-wrong -n |
| 182 | guix build package-with-something-wrong -n 2> "$module_dir/err" || true | 181 | guix build package-with-something-wrong -n 2> "$module_dir/err" || true |
| 183 | grep "unbound" "$module_dir/err" # actual error | 182 | grep "unbound" "$module_dir/err" # actual error |
| 184 | grep "forget.*(gnu packages base)" "$module_dir/err" # hint | 183 | grep "forget.*(gnu packages base)" "$module_dir/err" # hint |
| @@ -222,7 +221,7 @@ test "`guix build --log-file guile-bootstrap`" = "$log" | |||
| 222 | test "`guix build --log-file $out`" = "$log" | 221 | test "`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. |
| 225 | if 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. |
| 228 | result="t-result-$$" | 227 | result="t-result-$$" |
| @@ -231,8 +230,7 @@ guix build -r "$result" \ | |||
| 231 | test -x "$result/bin/guile" | 230 | test -x "$result/bin/guile" |
| 232 | 231 | ||
| 233 | # Should fail, because $result already exists. | 232 | # Should fail, because $result already exists. |
| 234 | if guix build -r "$result" -e '(@@ (gnu packages bootstrap) %bootstrap-guile)' | 233 | ! guix build -r "$result" -e '(@@ (gnu packages bootstrap) %bootstrap-guile)' |
| 235 | then false; else true; fi | ||
| 236 | 234 | ||
| 237 | rm -f "$result" | 235 | rm -f "$result" |
| 238 | 236 | ||
| @@ -270,8 +268,7 @@ drv2=`guix build hello -d --with-input=gcc=gcc-toolchain` | |||
| 270 | test "$drv1" != "$drv2" | 268 | test "$drv1" != "$drv2" |
| 271 | guix gc -R "$drv2" | grep `guix build -d gcc-toolchain` | 269 | guix gc -R "$drv2" | grep `guix build -d gcc-toolchain` |
| 272 | 270 | ||
| 273 | if guix build guile --with-input=libunistring=something-really-silly | 271 | ! guix build guile --with-input=libunistring=something-really-silly |
| 274 | then false; else true; fi | ||
| 275 | 272 | ||
| 276 | # Deprecated/superseded packages. | 273 | # Deprecated/superseded packages. |
| 277 | test "`guix build superseded -d`" = "`guix build bar -d`" | 274 | test "`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. |
| 280 | guix build -n time # PASS | 277 | guix build -n time # PASS |
| 281 | guix build -n time@1.9 # PASS, version found | 278 | guix build -n time@1.9 # PASS, version found |
| 282 | if guix build -n time@3.2; # FAIL, version not found | 279 | ! guix build -n time@3.2 # FAIL, version not found |
| 283 | then false; else true; fi | 280 | ! guix build -n something-that-will-never-exist # FAIL |
| 284 | if guix build -n something-that-will-never-exist; # FAIL | ||
| 285 | then false; else true; fi | ||
| 286 | 281 | ||
| 287 | # Invoking a monadic procedure. | 282 | # Invoking a monadic procedure. |
| 288 | guix build -e "(begin | 283 | guix build -e "(begin |
| @@ -354,5 +349,4 @@ export GUIX_BUILD_OPTIONS | |||
| 354 | guix build emacs | 349 | guix build emacs |
| 355 | 350 | ||
| 356 | GUIX_BUILD_OPTIONS="--something-completely-crazy" | 351 | GUIX_BUILD_OPTIONS="--something-completely-crazy" |
| 357 | if guix build emacs; | 352 | ! guix build emacs |
| 358 | then 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=$! | |||
| 224 | GUIX_DAEMON_SOCKET="guix://$tcp_socket" | 224 | GUIX_DAEMON_SOCKET="guix://$tcp_socket" |
| 225 | export GUIX_DAEMON_SOCKET | 225 | export GUIX_DAEMON_SOCKET |
| 226 | 226 | ||
| 227 | if guix gc; then false; else true; fi | 227 | ! guix gc |
| 228 | 228 | ||
| 229 | unset GUIX_DAEMON_SOCKET | 229 | unset GUIX_DAEMON_SOCKET |
| 230 | kill "$daemon_pid" | 230 | kill "$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 @@ | |||
| 23 | guix download --version | 23 | guix download --version |
| 24 | 24 | ||
| 25 | # Make sure it fails here. | 25 | # Make sure it fails here. |
| 26 | if guix download http://does.not/exist | 26 | ! guix download http://does.not/exist |
| 27 | then false; else true; fi | ||
| 28 | 27 | ||
| 29 | if guix download unknown://some/where; | 28 | ! guix download unknown://some/where; |
| 30 | then false; else true; fi | ||
| 31 | 29 | ||
| 32 | if guix download /does-not-exist | 30 | ! guix download /does-not-exist |
| 33 | then false; else true; fi | ||
| 34 | 31 | ||
| 35 | # This one should succeed. | 32 | # This one should succeed. |
| 36 | guix download "file://$abs_top_srcdir/README" | 33 | guix download "file://$abs_top_srcdir/README" |
| @@ -46,5 +43,4 @@ GUIX_DAEMON_SOCKET="/nowhere" guix download -o "$output" \ | |||
| 46 | cmp "$output" "$abs_top_srcdir/README" | 43 | cmp "$output" "$abs_top_srcdir/README" |
| 47 | 44 | ||
| 48 | # This one should fail. | 45 | # This one should fail. |
| 49 | if guix download "file:///does-not-exist" "file://$abs_top_srcdir/README" | 46 | ! guix download "file:///does-not-exist" "file://$abs_top_srcdir/README" |
| 50 | then 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 \ | |||
| 60 | grep '^PATH=' "$tmpdir/a" | 60 | grep '^PATH=' "$tmpdir/a" |
| 61 | grep '^GUIX_TEST_ABC=' "$tmpdir/a" | 61 | grep '^GUIX_TEST_ABC=' "$tmpdir/a" |
| 62 | grep '^GUIX_TEST_DEF=' "$tmpdir/a" | 62 | grep '^GUIX_TEST_DEF=' "$tmpdir/a" |
| 63 | if 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. |
| 66 | if guix environment --bootstrap --ad-hoc guile-bootstrap --pure \ | 66 | if 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. |
| 37 | for option in "" "-C 500M" "--verify" "--optimize" "--list-roots" | 37 | for option in "" "-C 500M" "--verify" "--optimize" "--list-roots" |
| 38 | do | 38 | do |
| 39 | if guix gc $option whatever; then false; else true; fi | 39 | ! guix gc $option whatever |
| 40 | done | 40 | done |
| 41 | 41 | ||
| 42 | # This should fail. | 42 | # This should fail. |
| 43 | if 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. |
| 46 | drv="`guix build guile-bootstrap -d`" | 46 | drv="`guix build guile-bootstrap -d`" |
| @@ -51,8 +51,7 @@ guix gc --references "$drv" | grep -e -bash | |||
| 51 | guix gc --references "$out" | 51 | guix gc --references "$out" |
| 52 | guix gc --references "$out/bin/guile" | 52 | guix gc --references "$out/bin/guile" |
| 53 | 53 | ||
| 54 | if guix gc --references /dev/null; | 54 | ! guix gc --references /dev/null; |
| 55 | then false; else true; fi | ||
| 56 | 55 | ||
| 57 | # Check derivers. | 56 | # Check derivers. |
| 58 | guix gc --derivers "$out" | grep "$drv" | 57 | guix gc --derivers "$out" | grep "$drv" |
| @@ -72,8 +71,7 @@ test -f "$drv" && test -L guix-gc-root | |||
| 72 | guix gc --list-roots | grep "$PWD/guix-gc-root" | 71 | guix gc --list-roots | grep "$PWD/guix-gc-root" |
| 73 | 72 | ||
| 74 | guix gc --list-live | grep "$drv" | 73 | guix gc --list-live | grep "$drv" |
| 75 | if guix gc --delete "$drv"; | 74 | ! guix gc --delete "$drv"; |
| 76 | then false; else true; fi | ||
| 77 | 75 | ||
| 78 | rm guix-gc-root | 76 | rm guix-gc-root |
| 79 | guix gc --list-dead | grep "$drv" | 77 | guix gc --list-dead | grep "$drv" |
| @@ -84,8 +82,7 @@ guix gc --delete "$drv" | |||
| 84 | guix gc -C 1KiB | 82 | guix gc -C 1KiB |
| 85 | 83 | ||
| 86 | # Check trivial error cases. | 84 | # Check trivial error cases. |
| 87 | if guix gc --delete /dev/null; | 85 | ! guix gc --delete /dev/null; |
| 88 | then false; else true; fi | ||
| 89 | 86 | ||
| 90 | # Bug #19757 | 87 | # Bug #19757 |
| 91 | out="`guix build guile-bootstrap`" | 88 | out="`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 | |||
| 46 | v1_0_1_commit="d68de958b60426798ed62797ff7c96c327a672ac" | 46 | v1_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'. |
| 49 | if 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" |
| 51 | then false; else true; fi | ||
| 52 | 51 | ||
| 53 | # This should work thanks to '--historical-authorizations'. | 52 | # This should work thanks to '--historical-authorizations'. |
| 54 | guix git authenticate "$v1_0_0_commit" "$v1_0_0_signer" \ | 53 | guix 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 | |||
| 60 | guix graph -e '(@ (gnu packages bootstrap) %bootstrap-guile)' \ | 60 | guix graph -e '(@ (gnu packages bootstrap) %bootstrap-guile)' \ |
| 61 | | grep guile-bootstrap | 61 | | grep guile-bootstrap |
| 62 | 62 | ||
| 63 | if 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. |
| 78 | guix graph git | grep 'label = "openssl' | 78 | guix graph git | grep 'label = "openssl' |
| 79 | guix graph git --with-input=openssl=libressl | grep 'label = "libressl' | 79 | guix graph git --with-input=openssl=libressl | grep 'label = "libressl' |
| 80 | if guix graph git --with-input=openssl=libressl | grep 'label = "openssl' | 80 | ! guix graph git --with-input=openssl=libressl | grep 'label = "openssl' |
| 81 | then false; else true; fi | ||
| 82 | 81 | ||
| 83 | # Try --load-path | 82 | # Try --load-path |
| 84 | guix graph -L $module_dir dummy | grep 'label = "dummy' | 83 | guix graph -L $module_dir dummy | grep 'label = "dummy' |
| 85 | 84 | ||
| 86 | # Displaying shortest paths (or lack thereof). | 85 | # Displaying shortest paths (or lack thereof). |
| 87 | if guix graph --path emacs vim; then false; else true; fi | 86 | ! guix graph --path emacs vim |
| 88 | 87 | ||
| 89 | path="\ | 88 | path="\ |
| 90 | emacs | 89 | emacs |
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 | |||
| 34 | test `guix hash -H sha512 -f hex /dev/null` = cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e | 34 | test `guix hash -H sha512 -f hex /dev/null` = cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e |
| 35 | test `guix hash -H sha1 -f base64 /dev/null` = "2jmj7l5rSw0yVb/vlWAYkK/YBwk=" | 35 | test `guix hash -H sha1 -f base64 /dev/null` = "2jmj7l5rSw0yVb/vlWAYkK/YBwk=" |
| 36 | 36 | ||
| 37 | if guix hash -H abcd1234 /dev/null; | 37 | ! guix hash -H abcd1234 /dev/null |
| 38 | then false; else true; fi | ||
| 39 | 38 | ||
| 40 | mkdir "$tmpdir" | 39 | mkdir "$tmpdir" |
| 41 | echo -n executable > "$tmpdir/exe" | 40 | echo -n executable > "$tmpdir/exe" |
| @@ -46,13 +45,11 @@ mkdir "$tmpdir/subdir" | |||
| 46 | test `guix hash -r "$tmpdir"` = 10k1lw41wyrjf9mxydi0is5nkpynlsvgslinics4ppir13g7d74p | 45 | test `guix hash -r "$tmpdir"` = 10k1lw41wyrjf9mxydi0is5nkpynlsvgslinics4ppir13g7d74p |
| 47 | 46 | ||
| 48 | # Without '-r', this should fail. | 47 | # Without '-r', this should fail. |
| 49 | if guix hash "$tmpdir" | 48 | ! guix hash "$tmpdir" |
| 50 | then 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. |
| 54 | if guix hash -r /dev/null | 52 | ! guix hash -r /dev/null |
| 55 | then false; else true; fi | ||
| 56 | 53 | ||
| 57 | # Adding a .git directory | 54 | # Adding a .git directory |
| 58 | mkdir "$tmpdir/.git" | 55 | mkdir "$tmpdir/.git" |
| @@ -65,6 +62,5 @@ test `guix hash -r $tmpdir` = 0a50z04zyzf7pidwxv0nwbj82pgzbrhdy9562kncnvkcfvb48m | |||
| 65 | test `guix hash -r $tmpdir -x` = 10k1lw41wyrjf9mxydi0is5nkpynlsvgslinics4ppir13g7d74p | 62 | test `guix hash -r $tmpdir -x` = 10k1lw41wyrjf9mxydi0is5nkpynlsvgslinics4ppir13g7d74p |
| 66 | 63 | ||
| 67 | # Without '-r', this should fail. | 64 | # Without '-r', this should fail. |
| 68 | if guix hash "$tmpdir" | 65 | ! guix hash "$tmpdir" |
| 69 | then 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 | ||
| 60 | out=`guix lint -c synopsis,description dummy 2>&1` | 60 | out=`guix lint -c synopsis,description dummy 2>&1` |
| 61 | if [ `grep_warning "$out"` -ne 3 ] | 61 | test `grep_warning "$out"` -eq 3 |
| 62 | then false; else true; fi | ||
| 63 | 62 | ||
| 64 | out=`guix lint -c synopsis dummy 2>&1` | 63 | out=`guix lint -c synopsis dummy 2>&1` |
| 65 | if [ `grep_warning "$out"` -ne 2 ] | 64 | test `grep_warning "$out"` -eq 2 |
| 66 | then false; else true; fi | ||
| 67 | 65 | ||
| 68 | out=`guix lint -c description dummy 2>&1` | 66 | out=`guix lint -c description dummy 2>&1` |
| 69 | if [ `grep_warning "$out"` -ne 1 ] | 67 | test `grep_warning "$out"` -eq 1 |
| 70 | then false; else true; fi | ||
| 71 | 68 | ||
| 72 | out=`guix lint -c description,synopsis dummy 2>&1` | 69 | out=`guix lint -c description,synopsis dummy 2>&1` |
| 73 | if [ `grep_warning "$out"` -ne 3 ] | 70 | test `grep_warning "$out"` -eq 3 |
| 74 | then false; else true; fi | ||
| 75 | 71 | ||
| 76 | if guix lint -c synopsis,invalid-checker dummy 2>&1 | \ | 72 | guix lint -c synopsis,invalid-checker dummy 2>&1 | \ |
| 77 | grep -q 'invalid-checker: invalid checker' | 73 | grep -q 'invalid-checker: invalid checker' |
| 78 | then true; else false; fi | ||
| 79 | 74 | ||
| 80 | # Make sure specifying multiple packages works. | 75 | # Make sure specifying multiple packages works. |
| 81 | guix lint -c inputs-should-be-native dummy dummy@42 dummy | 76 | guix 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 | |||
| 85 | unset GUIX_PACKAGE_PATH | 80 | unset GUIX_PACKAGE_PATH |
| 86 | 81 | ||
| 87 | out=`guix lint -L $module_dir -c synopsis,description dummy 2>&1` | 82 | out=`guix lint -L $module_dir -c synopsis,description dummy 2>&1` |
| 88 | if [ `grep_warning "$out"` -ne 3 ] | 83 | test `grep_warning "$out"` -eq 3 |
| 89 | then false; else true; fi | ||
| 90 | 84 | ||
| 91 | # Make sure specifying multiple packages works. | 85 | # Make sure specifying multiple packages works. |
| 92 | guix lint -L $module_dir -c inputs-should-be-native dummy dummy@42 dummy | 86 | guix 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"/* |
| 84 | else | 83 | else |
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`" | |||
| 45 | drv="`guix pack idutils -d --no-grafts --target=arm-linux-gnueabihf`" | 45 | drv="`guix pack idutils -d --no-grafts --target=arm-linux-gnueabihf`" |
| 46 | guix gc -R "$drv" | \ | 46 | guix 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`" |
| 48 | if guix gc -R "$drv" | grep "`guix build idutils -d --no-grafts`"; | 48 | ! guix gc -R "$drv" | grep "`guix build idutils -d --no-grafts`" |
| 49 | then false; else true; fi | ||
| 50 | 49 | ||
| 51 | # Build a tarball with no compression. | 50 | # Build a tarball with no compression. |
| 52 | guix pack --compression=none --bootstrap guile-bootstrap | 51 | guix 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" | |||
| 36 | test -x "$profile/bin/guile" | 36 | test -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'. |
| 39 | if guix install -r guile-bootstrap -p "$profile" --bootstrap | 39 | ! guix install -r guile-bootstrap -p "$profile" --bootstrap |
| 40 | then false; else true; fi | ||
| 41 | test -x "$profile/bin/guile" | 40 | test -x "$profile/bin/guile" |
| 42 | 41 | ||
| 43 | guix upgrade --version | 42 | guix upgrade --version |
| 44 | guix upgrade -n | 43 | guix upgrade -n |
| 45 | guix upgrade gui.e -n | 44 | guix upgrade gui.e -n |
| 46 | if guix upgrade foo bar -n; | 45 | ! guix upgrade foo bar -n; |
| 47 | then false; else true; fi | ||
| 48 | 46 | ||
| 49 | guix remove --version | 47 | guix remove --version |
| 50 | guix remove --bootstrap guile-bootstrap -p "$profile" | 48 | guix remove --bootstrap guile-bootstrap -p "$profile" |
| 51 | ! test -x "$profile/bin/guile" | 49 | ! test -x "$profile/bin/guile" |
| 52 | test `guix package -p "$profile" -I | wc -l` -eq 0 | 50 | test `guix package -p "$profile" -I | wc -l` -eq 0 |
| 53 | 51 | ||
| 54 | if guix remove -p "$profile" this-is-not-installed --bootstrap | 52 | ! guix remove -p "$profile" this-is-not-installed --bootstrap |
| 55 | then false; else true; fi | ||
| 56 | 53 | ||
| 57 | if guix remove -i guile-bootstrap -p "$profile" --bootstrap | 54 | ! guix remove -i guile-bootstrap -p "$profile" --bootstrap |
| 58 | then false; else true; fi | ||
| 59 | 55 | ||
| 60 | guix search '\<board\>' game | grep '^name: gnubg' | 56 | guix search '\<board\>' game | grep '^name: gnubg' |
| 61 | 57 | ||
| @@ -64,7 +60,7 @@ guix show guile | |||
| 64 | guix show python@3 | grep "^name: python" | 60 | guix 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. |
| 67 | if guix show python@2; then false; else true; fi | 63 | ! guix show python@2 |
| 68 | 64 | ||
| 69 | # Specifying multiple packages. | 65 | # Specifying multiple packages. |
| 70 | output="`guix show sed grep | grep ^name:`" | 66 | output="`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. |
| 98 | if guix package -p "$profile" --list-generations=42; | 98 | ! guix package -p "$profile" --list-generations=42 |
| 99 | then false; else true; fi | 99 | ! guix package -p "$profile" --switch-generation=99 |
| 100 | if guix package -p "$profile" --switch-generation=99; | ||
| 101 | then false; else true; fi | ||
| 102 | 100 | ||
| 103 | # Remove a package. | 101 | # Remove a package. |
| 104 | guix package --bootstrap -p "$profile" -r "guile-bootstrap" | 102 | guix package --bootstrap -p "$profile" -r "guile-bootstrap" |
| @@ -174,8 +172,7 @@ test -z "`guix package -p "$profile" -l 3`" | |||
| 174 | rm "$profile" | 172 | rm "$profile" |
| 175 | guix package --bootstrap -p "$profile" -i guile-bootstrap | 173 | guix package --bootstrap -p "$profile" -i guile-bootstrap |
| 176 | guix package --bootstrap -p "$profile_alt" -i gcc-bootstrap | 174 | guix package --bootstrap -p "$profile_alt" -i gcc-bootstrap |
| 177 | if guix package -p "$profile" --search-paths | grep LIBRARY_PATH | 175 | ! guix package -p "$profile" --search-paths | grep LIBRARY_PATH |
| 178 | then false; fi | ||
| 179 | guix package -p "$profile" -p "$profile_alt" --search-paths \ | 176 | guix 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" | |||
| 36 | trap 'rm -f "$profile" "$profile.lock" "$profile-"[0-9]* "$tmpfile"; rm -rf "$module_dir" t-home-'"$$" EXIT | 36 | trap '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. |
| 39 | if guix package --bootstrap -e +; | 39 | ! guix package --bootstrap -e + |
| 40 | then 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.) |
| 65 | if 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 |
| 66 | then false; else true; fi | ||
| 67 | 65 | ||
| 68 | guix package --bootstrap -n -p "$profile" -i g-wrap guile@2.0 \ | 66 | guix 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. |
| 81 | if guix package -p "$profile" --delete-generations=42; | 79 | ! guix package -p "$profile" --delete-generations=42 |
| 82 | then 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. |
| 85 | guix package -p "$profile" --delete-generations=0 | 82 | guix 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. |
| 94 | guix package --bootstrap -i "guile-bootstrap:out" -p "$profile" -n | 91 | guix package --bootstrap -i "guile-bootstrap:out" -p "$profile" -n |
| 95 | if 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 |
| 96 | then false; else true; fi | 93 | ! guix package --bootstrap -i "guile-bootstrap:does-not-exist" -p "$profile" |
| 97 | if guix package --bootstrap -i "guile-bootstrap:does-not-exist" -p "$profile"; | ||
| 98 | then 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. |
| 102 | if guix package --bootstrap -r something-not-installed -p "$profile"; | 97 | ! guix package --bootstrap -r something-not-installed -p "$profile" |
| 103 | then false; else true; fi | ||
| 104 | 98 | ||
| 105 | # Check whether `--list-available' returns something sensible. | 99 | # Check whether `--list-available' returns something sensible. |
| 106 | guix package -p "$profile" -A 'gui.*e' | grep guile | 100 | guix package -p "$profile" -A 'gui.*e' | grep guile |
| @@ -112,8 +106,8 @@ guix package --show=guile | grep "^name: guile" | |||
| 112 | guix package --show=texlive | 106 | guix 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. |
| 115 | if guix package --show=does-not-exist; then false; else true; fi | 109 | ! guix package --show=does-not-exist |
| 116 | if guix package --show=emacs@42; then false; else true; fi | 110 | ! guix package --show=emacs@42 |
| 117 | 111 | ||
| 118 | # Search. | 112 | # Search. |
| 119 | LC_MESSAGES=C | 113 | LC_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. |
| 159 | generation="`readlink_base "$profile"`" | 153 | generation="`readlink_base "$profile"`" |
| 160 | if guix package -p "$profile" --delete-generations=12m; | 154 | ! guix package -p "$profile" --delete-generations=12m |
| 161 | then false; else true; fi | ||
| 162 | test "`readlink_base "$profile"`" = "$generation" | 155 | test "`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. |
| 167 | guix package --list-generations -p "$profile" | 160 | guix package --list-generations -p "$profile" |
| 168 | if guix package --bootstrap -p "$profile" --delete-generations=1.. | 161 | ! guix package --bootstrap -p "$profile" --delete-generations=1.. |
| 169 | then false; else true; fi | ||
| 170 | test "`readlink_base "$profile"`" = "$generation" | 162 | test "`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. |
| 173 | real_profile="`readlink -f "$profile"`" | 165 | real_profile="`readlink -f "$profile"`" |
| 174 | if guix gc -d "$real_profile" | 166 | ! guix gc -d "$real_profile" |
| 175 | then false; else true; fi | ||
| 176 | test -d "$real_profile" | 167 | test -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>. |
| 241 | if test -e "$HOME/.guix-profile-0-link"; then false; fi | 232 | ! test -e "$HOME/.guix-profile-0-link" |
| 242 | if test -e "$HOME/.guix-profile-1-link"; then false; fi | 233 | ! test -e "$HOME/.guix-profile-1-link" |
| 243 | guix package --bootstrap -p "$HOME/.guix-profile" -i guile-bootstrap | 234 | guix package --bootstrap -p "$HOME/.guix-profile" -i guile-bootstrap |
| 244 | if test -e "$HOME/.guix-profile-1-link"; then false; fi | 235 | ! test -e "$HOME/.guix-profile-1-link" |
| 245 | guix package --bootstrap --roll-back -p "$HOME/.guix-profile" | 236 | guix package --bootstrap --roll-back -p "$HOME/.guix-profile" |
| 246 | if 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. |
| 249 | if guix package install foo-bar; | 240 | ! guix package install foo-bar |
| 250 | then 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* |
| 338 | EOF | 328 | EOF |
| 339 | if guix package --bootstrap --install-from-file="$module_dir/package.scm" | 329 | ! guix package --bootstrap --install-from-file="$module_dir/package.scm" |
| 340 | then false; else true; fi | ||
| 341 | 330 | ||
| 342 | rm "$module_dir/package.scm" | 331 | rm "$module_dir/package.scm" |
| 343 | 332 | ||
