Prevent inlining for a number of procedures

So that the load-new-guix-revision tests work with Guile 3.
This commit is contained in:
Christopher Baines 2020-02-27 21:14:34 +00:00
parent f4922fc904
commit b166177dbd

View file

@ -915,6 +915,8 @@ WHERE job_id = $1"
derivation-file-names-by-system)) derivation-file-names-by-system))
(prevent-inlining-for-tests channel->derivations-by-system)
(define (channel-derivations-by-system->guix-store-item (define (channel-derivations-by-system->guix-store-item
store store
channel-derivations-by-system) channel-derivations-by-system)
@ -939,6 +941,8 @@ WHERE job_id = $1"
(derivation->output-path derivation-for-current-system))) (derivation->output-path derivation-for-current-system)))
#f))) #f)))
(prevent-inlining-for-tests channel-derivations-by-system->guix-store-item)
(define (glibc-locales-for-guix-store-path store store-path) (define (glibc-locales-for-guix-store-path store store-path)
(let ((inf (if (defined? (let ((inf (if (defined?
'open-inferior/container 'open-inferior/container
@ -1134,6 +1138,8 @@ WHERE job_id = $1"
(lambda (key . args) (lambda (key . args)
(display-backtrace (make-stack #t) (current-error-port)))))) (display-backtrace (make-stack #t) (current-error-port))))))
(prevent-inlining-for-tests extract-information-from)
(define (update-package-versions-table conn git-repository-id commit) (define (update-package-versions-table conn git-repository-id commit)
(with-time-logging "lock table: package_versions_by_guix_revision_range" (with-time-logging "lock table: package_versions_by_guix_revision_range"
;; Lock the table to wait for other transactions to commit before updating ;; Lock the table to wait for other transactions to commit before updating
@ -1517,6 +1523,8 @@ SKIP LOCKED")
(f store))) (f store)))
(prevent-inlining-for-tests with-store-connection)
(define (setup-logging id thunk) (define (setup-logging id thunk)
(let* ((previous-output-port (current-output-port)) (let* ((previous-output-port (current-output-port))
(previous-error-port (current-error-port)) (previous-error-port (current-error-port))
@ -1548,6 +1556,8 @@ SKIP LOCKED")
(set-current-error-port previous-error-port) (set-current-error-port previous-error-port)
result)) result))
(prevent-inlining-for-tests setup-logging)
(define (process-load-new-guix-revision-job id) (define (process-load-new-guix-revision-job id)
(with-postgresql-connection (with-postgresql-connection
(simple-format #f "load-new-guix-revision ~A" id) (simple-format #f "load-new-guix-revision ~A" id)