aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-02-27 21:13:53 +0000
committerChristopher Baines <mail@cbaines.net>2020-02-27 21:13:53 +0000
commitf4922fc904fb0e17b4e4fb52040ff745af55acae (patch)
tree0c35c5c2ce8a6d6718bf100642fa4ccac88eb18e /guix-data-service
parent73be24d8ac9d0d30dd13482d5618fe52ac499df1 (diff)
downloaddata-service-f4922fc904fb0e17b4e4fb52040ff745af55acae.tar
data-service-f4922fc904fb0e17b4e4fb52040ff745af55acae.tar.gz
Add some syntax to prevent inlining within modules
This is relevant, as it prevents the mock function used in tests working with Guile 3.
Diffstat (limited to 'guix-data-service')
-rw-r--r--guix-data-service/utils.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/guix-data-service/utils.scm b/guix-data-service/utils.scm
index a748482..1eb3e4f 100644
--- a/guix-data-service/utils.scm
+++ b/guix-data-service/utils.scm
@@ -17,7 +17,8 @@
(define-module (guix-data-service utils)
#:export (call-with-time-logging
- with-time-logging))
+ with-time-logging
+ prevent-inlining-for-tests))
(define (call-with-time-logging action thunk)
(simple-format #t "debug: Starting ~A\n" action)
@@ -31,3 +32,6 @@
(define-syntax-rule (with-time-logging action exp ...)
"Log under NAME the time taken to evaluate EXP."
(call-with-time-logging action (lambda () exp ...)))
+
+(define-syntax-rule (prevent-inlining-for-tests var)
+ (set! var var))