diff options
| author | Frederick Muriuki Muriithi | 2026-06-22 10:48:53 -0500 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2026-06-26 10:14:49 -0500 |
| commit | 2fdba37fe26ff3c24f5cfae040d2098c31cf30c2 (patch) | |
| tree | 7a69e93763d1b6a38b901bfb913f899bc895de93 | |
| parent | 39ee80805619ab694637ede7f53a08aa66734c7d (diff) | |
| download | gn-machines-2fdba37fe26ff3c24f5cfae040d2098c31cf30c2.tar.gz | |
Bugfix: empty body in form (lambda () (begin))
lambda does not allow an empty body, so we need to ensure the "in-guard" thunk of the dynamic-wind call does not end up with an empty `(begin)` form. The "out-guard" thunk does not suffer this problem since it has other forms in addition to any teardown g-expressions that might be provided.
| -rw-r--r-- | genenetwork-development.scm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/genenetwork-development.scm b/genenetwork-development.scm index 85f34fb..413afdb 100644 --- a/genenetwork-development.scm +++ b/genenetwork-development.scm @@ -1732,10 +1732,16 @@ delete-test-users, etc.) as the genenetwork user via sudo." (string-append site-packages ":" (getenv "PYTHONPATH"))) (setenv "PYTHONPATH" site-packages)) (dynamic-wind - (lambda () (begin #$@setup)) ;; Run setup if provided + (lambda () ;; Run setup if provided + #$(if (null? setup) + #~(if #f #f) + #~(begin #$@setup))) (lambda () (apply invoke '#$test-command)) ;; Run actual tests (lambda () ;; Always run teardowns to clean up. - (begin #$@teardown) ;; run if teardowns provided + (begin ;; run if teardowns provided + ;; we don't need `null?' check here because we have other + ;; statements therefore the `lambda' does not end up empty. + #$@teardown) (chdir orig-dir) (delete-file-recursively tmp-dir)))))))))) |
