diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2023-10-19 16:32:03 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2023-10-20 00:33:26 +0200 |
| commit | 2aa45d03475f7bd27d4ba5bc71b0cb812aa74768 (patch) | |
| tree | 04f584616a265a3b881b885f28098bb5185bdd31 /tests | |
| parent | 47e265af75141f6ffb557cf6c41a02a05ec82ccb (diff) | |
tests: Avoid three-argument ‘test-assertm’.
This fixes a discrepancy with other tests that have a two-argument
‘test-assertm’ macro.
* tests/pack.scm (test-assertm): Move within ‘with-external-store’, and
remove ‘store’ parameter.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/pack.scm | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/pack.scm b/tests/pack.scm index cf249f861bf..8fdaed01688 100644 --- a/tests/pack.scm +++ b/tests/pack.scm | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> | 2 | ;;; Copyright © 2017-2021, 2023 Ludovic Courtès <ludo@gnu.org> |
| 3 | ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net> | 3 | ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net> |
| 4 | ;;; Copyright © 2021, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com> | 4 | ;;; Copyright © 2021, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
| 5 | ;;; | 5 | ;;; |
| @@ -46,12 +46,6 @@ | |||
| 46 | ;; Globally disable grafts because they can trigger early builds. | 46 | ;; Globally disable grafts because they can trigger early builds. |
| 47 | (%graft? #f) | 47 | (%graft? #f) |
| 48 | 48 | ||
| 49 | (define-syntax-rule (test-assertm name store exp) | ||
| 50 | (test-assert name | ||
| 51 | (let ((guile (package-derivation store %bootstrap-guile))) | ||
| 52 | (run-with-store store exp | ||
| 53 | #:guile-for-build guile)))) | ||
| 54 | |||
| 55 | (define %gzip-compressor | 49 | (define %gzip-compressor |
| 56 | ;; Compressor that uses the bootstrap 'gzip'. | 50 | ;; Compressor that uses the bootstrap 'gzip'. |
| 57 | ((@ (guix scripts pack) compressor) "gzip" | 51 | ((@ (guix scripts pack) compressor) "gzip" |
| @@ -82,8 +76,14 @@ | |||
| 82 | ;; dependencies may be already there, or we can get substitutes or build them | 76 | ;; dependencies may be already there, or we can get substitutes or build them |
| 83 | ;; quite inexpensively; see <https://bugs.gnu.org/32184>. | 77 | ;; quite inexpensively; see <https://bugs.gnu.org/32184>. |
| 84 | (with-external-store store | 78 | (with-external-store store |
| 79 | (define-syntax-rule (test-assertm name exp) | ||
| 80 | (test-assert name | ||
| 81 | (let ((guile (package-derivation store %bootstrap-guile))) | ||
| 82 | (run-with-store store exp | ||
| 83 | #:guile-for-build guile)))) | ||
| 84 | |||
| 85 | (unless store (test-skip 1)) | 85 | (unless store (test-skip 1)) |
| 86 | (test-assertm "self-contained-tarball" store | 86 | (test-assertm "self-contained-tarball" |
| 87 | (mlet* %store-monad | 87 | (mlet* %store-monad |
| 88 | ((guile (set-guile-for-build (default-guile))) | 88 | ((guile (set-guile-for-build (default-guile))) |
| 89 | (profile -> (profile | 89 | (profile -> (profile |
| @@ -136,7 +136,7 @@ | |||
| 136 | (built-derivations (list check)))) | 136 | (built-derivations (list check)))) |
| 137 | 137 | ||
| 138 | (unless store (test-skip 1)) | 138 | (unless store (test-skip 1)) |
| 139 | (test-assertm "self-contained-tarball + localstatedir" store | 139 | (test-assertm "self-contained-tarball + localstatedir" |
| 140 | (mlet* %store-monad | 140 | (mlet* %store-monad |
| 141 | ((guile (set-guile-for-build (default-guile))) | 141 | ((guile (set-guile-for-build (default-guile))) |
| 142 | (profile -> (profile | 142 | (profile -> (profile |
| @@ -159,7 +159,7 @@ | |||
| 159 | (built-derivations (list check)))) | 159 | (built-derivations (list check)))) |
| 160 | 160 | ||
| 161 | (unless store (test-skip 1)) | 161 | (unless store (test-skip 1)) |
| 162 | (test-assertm "self-contained-tarball + localstatedir, UTF-8 file names" store | 162 | (test-assertm "self-contained-tarball + localstatedir, UTF-8 file names" |
| 163 | (mlet* %store-monad | 163 | (mlet* %store-monad |
| 164 | ((guile (set-guile-for-build (default-guile))) | 164 | ((guile (set-guile-for-build (default-guile))) |
| 165 | (tree (interned-file-tree | 165 | (tree (interned-file-tree |
| @@ -210,7 +210,7 @@ | |||
| 210 | (built-derivations (list check)))) | 210 | (built-derivations (list check)))) |
| 211 | 211 | ||
| 212 | (unless store (test-skip 1)) | 212 | (unless store (test-skip 1)) |
| 213 | (test-assertm "docker-image + localstatedir" store | 213 | (test-assertm "docker-image + localstatedir" |
| 214 | (mlet* %store-monad | 214 | (mlet* %store-monad |
| 215 | ((guile (set-guile-for-build (default-guile))) | 215 | ((guile (set-guile-for-build (default-guile))) |
| 216 | (profile -> (profile | 216 | (profile -> (profile |
| @@ -250,7 +250,7 @@ | |||
| 250 | (built-derivations (list check)))) | 250 | (built-derivations (list check)))) |
| 251 | 251 | ||
| 252 | (unless store (test-skip 1)) | 252 | (unless store (test-skip 1)) |
| 253 | (test-assertm "squashfs-image + localstatedir" store | 253 | (test-assertm "squashfs-image + localstatedir" |
| 254 | (mlet* %store-monad | 254 | (mlet* %store-monad |
| 255 | ((guile (set-guile-for-build (default-guile))) | 255 | ((guile (set-guile-for-build (default-guile))) |
| 256 | (profile -> (profile | 256 | (profile -> (profile |
| @@ -289,7 +289,7 @@ | |||
| 289 | (built-derivations (list check)))) | 289 | (built-derivations (list check)))) |
| 290 | 290 | ||
| 291 | (unless store (test-skip 1)) | 291 | (unless store (test-skip 1)) |
| 292 | (test-assertm "deb archive with symlinks and control files" store | 292 | (test-assertm "deb archive with symlinks and control files" |
| 293 | (mlet* %store-monad | 293 | (mlet* %store-monad |
| 294 | ((guile (set-guile-for-build (default-guile))) | 294 | ((guile (set-guile-for-build (default-guile))) |
| 295 | (profile -> (profile | 295 | (profile -> (profile |
| @@ -378,7 +378,7 @@ | |||
| 378 | (built-derivations (list check)))) | 378 | (built-derivations (list check)))) |
| 379 | 379 | ||
| 380 | (unless store (test-skip 1)) | 380 | (unless store (test-skip 1)) |
| 381 | (test-assertm "rpm archive can be installed/uninstalled" store | 381 | (test-assertm "rpm archive can be installed/uninstalled" |
| 382 | (mlet* %store-monad | 382 | (mlet* %store-monad |
| 383 | ((guile (set-guile-for-build (default-guile))) | 383 | ((guile (set-guile-for-build (default-guile))) |
| 384 | (profile -> (profile | 384 | (profile -> (profile |
