diff options
Diffstat (limited to 'tests/profiles.scm')
| -rw-r--r-- | tests/profiles.scm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/profiles.scm b/tests/profiles.scm index 55e7146a7a0..e2472aa9e85 100644 --- a/tests/profiles.scm +++ b/tests/profiles.scm | |||
| @@ -367,11 +367,13 @@ | |||
| 367 | (profile -> (derivation->output-path drv)) | 367 | (profile -> (derivation->output-path drv)) |
| 368 | (bindir -> (string-append profile "/bin")) | 368 | (bindir -> (string-append profile "/bin")) |
| 369 | (_ (built-derivations (list drv)))) | 369 | (_ (built-derivations (list drv)))) |
| 370 | (define-syntax-rule (with-environment-excursion exp ...) | 370 | (define-syntax-rule (with-environment-excursion body ...) |
| 371 | ;; Save the current environment variables, run BODY..., and restore | ||
| 372 | ;; them. | ||
| 371 | (let ((env (environ))) | 373 | (let ((env (environ))) |
| 372 | (dynamic-wind | 374 | (dynamic-wind |
| 373 | (const #t) | 375 | (const #t) |
| 374 | (lambda () exp ...) | 376 | (lambda () body ...) |
| 375 | (lambda () (environ env))))) | 377 | (lambda () (environ env))))) |
| 376 | 378 | ||
| 377 | (return (and (with-environment-excursion | 379 | (return (and (with-environment-excursion |
