From f51888272558d98cf5c196b93fb6c499056fbf6c Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 6 May 2023 15:07:09 +0200 Subject: tests: Add missing module imports for marionette-evaluated code. This missing imports became apparent with commit a09c7da8f8d8e732f969cf0a09aaa78f87032ab1, which runs the marionette service in a fresh Guile process with fewer imports. * gnu/tests/databases.scm (run-postgresql-test, run-timescaledb-test) (run-mysql-test): Add missing module imports for code passed to 'marionette-eval'. * gnu/tests/docker.scm (run-docker-test, run-docker-system-test): Likewise. * gnu/tests/mail.scm (run-dovecot-test, run-getmail-test): Likewise. * gnu/tests/monitoring.scm (run-zabbix-server-test): Likewise. * gnu/tests/pam.scm (run-test-pam-limits): Likewise. * gnu/tests/reconfigure.scm (run-switch-to-system-test) (run-install-bootloader-test): Likewise. * gnu/tests/security-token.scm (run-pcscd-test): Likewise. * gnu/tests/install.scm (gui-test-program): Likewise. * gnu/tests/telephony.scm (run-jami-test): Add modules to the #:imported-modules argument of 'marionette-operating-system'. [test]: Remove them from 'with-imported-modules'; remove 'with-extensions'. Add "d-bus tooling loaded" test to set up %load-path and %load-compiled-path so the marionette process can find guile-ac-d-bus and guile-packrat. --- gnu/tests/databases.scm | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'gnu/tests/databases.scm') diff --git a/gnu/tests/databases.scm b/gnu/tests/databases.scm index 92be1a829b..7c8b87942f 100644 --- a/gnu/tests/databases.scm +++ b/gnu/tests/databases.scm @@ -196,7 +196,9 @@ (marionette-eval '(begin (use-modules (ice-9 ftw) - (ice-9 match)) + (ice-9 match) + (rnrs io ports)) + (current-output-port (open-file "/dev/console" "w0")) (let ((server-log-file @@ -317,6 +319,8 @@ (begin (marionette-eval '(begin + (use-modules (rnrs io ports)) + (let loop ((i 10)) (unless (or (zero? i) (and (file-exists? #$%role-log-file) @@ -331,8 +335,9 @@ (test-assert "database creation" (marionette-eval '(begin - (current-output-port - (open-file "/dev/console" "w0")) + (use-modules (guix build utils)) + + (current-output-port (open-file "/dev/console" "w0")) (invoke #$(file-append postgresql "/bin/psql") "-tA" "-c" "CREATE DATABASE test")) marionette)) @@ -466,7 +471,9 @@ data double PRECISION NULL "awesome\n" (marionette-eval '(begin - (use-modules (ice-9 popen)) + (use-modules (ice-9 popen) + (rnrs io ports)) + (let* ((port (open-pipe* OPEN_READ #$(file-append mariadb "/bin/mysql") "guix" -- cgit v1.2.3