summaryrefslogtreecommitdiff
path: root/gnu/build/marionette.scm
AgeCommit message (Expand)Author
2022-09-16marionette: Avoid read error when wait-for-file file is empty....Since #<eof> can't be read. * gnu/build/marionette.scm (wait-for-file): Return "" if file is empty. Partially-Fixes: https://issues.guix.gnu.org/57827 Christopher Baines
2022-09-16marionette: Make it easier to debug REPL read failures....Log the remaining contnet written to the REPL, so that there's more to go on than: socket:5:14: Unknown # object: "#<" * gnu/build/marionette.scm (marionette-eval): Catch exceptions from read and log the remainder of the content from the REPL. Christopher Baines
2022-08-28build: marionette: Add support for Tesseract OCR....* gnu/build/marionette.scm (invoke-ocrad-ocr): New procedure. (invoke-tesseract-ocr): Likewise. (marionette-screen-text): Rename the #:ocrad argument to #:ocr. Dispatch the matching OCR invocation procedure. (wait-for-screen-text): Rename the #:ocrad argument to #:ocr. * gnu/tests/base.scm (run-basic-test): Adjust accordingly. * gnu/tests/install.scm (enter-luks-passphrase): Likewise. (enter-luks-passphrase-for-home): Likewise. Maxim Cournoyer
2022-08-28marionette: Improve the error message of 'wait-for-screen-text'....* gnu/build/marionette.scm (wait-for-screen-text): Return the last OCR'd text when the predicate fails to match instead of the not useful predicate object. Maxim Cournoyer
2022-08-11build: marionette: Adjust QEMU Info manual reference....* gnu/build/marionette.scm (marionette-control): Update doc to correct the QEMU Info manual reference. Maxim Cournoyer
2022-08-09tests: Add qemu-guest-agent system test....Enable the QEMU guest agent interface in marionette VMs, run the qemu-guest-agent service in one and try talking to it. * gnu/build/marionette.scm (make-marionette): Enable the guest agent device. * gnu/tests/virtualization.scm (run-qemu-guest-agent-test): New procedure. (%test-qemu-guest-agent): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Timotej Lazar
2022-05-22marionette: Add #:address parameter to 'wait-for-tcp-port'....* gnu/build/marionette.scm (wait-for-tcp-port): Add #:address parameter. Honor it, and improve error reporting in the 'failure case. Ludovic Courtès
2021-12-23Remove VM generation dead-code....This code duplicates the (gnu system image) and (gnu build image) code. Using VM for image generation is not needed, not portable and really slow. Remove all the VM image generation code to make sure that only the image API is used. * gnu/build/vm.scm: Remove it. Move the qemu-command procedure to ... * gnu/build/marionette.scm: ... here. * gnu/local.mk (GNU_SYSTEM_MODULES): Adapt it. * tests/modules.scm: Ditto. * gnu/tests/install.scm: Ditto. * gnu/system/vm.scm: Adapt it and remove expression->derivation-in-linux-vm, qemu-img, system-qemu-image/shared-store and system-docker-image procedures. * doc/guix.texi (G-Expressions): Adapt it. Mathieu Othacehe
2021-09-26marionette: Print a line when a test succeeds....* gnu/build/marionette.scm (system-test-runner): Add call to 'test-runner-on-test-end!'. Ludovic Courtès
2021-09-26marionette: 'system-test-runner' can create output directory....* gnu/build/marionette.scm (system-test-runner): Take optional 'log-directory' parameter. Add 'test-begin' handler and honor LOG-DIRECTORY. Ludovic Courtès
2021-09-26marionette: 'system-test-runner' dumps test log upon failure....* gnu/build/marionette.scm (system-test-runner): In 'test-end' handler, when SUCCESS? is false, dump log content to the current error port. Ludovic Courtès
2021-09-25tests: Adjust to SRFI-64 as found in Guile 3.0.7....In Guile 3.0.7, 'test-runner-current' is set to #f upon 'test-end'. Consequently, the previous strategy, where we'd call 'test-runner-current' after 'test-end', no longer works. Instead, set the test runner in each test right before 'test-begin'. * gnu/build/marionette.scm (system-test-runner): New procedure. * gnu/tests/audio.scm (run-mpd-test): Replace (exit (= ...)) idiom by (test-runner-current (system-test-runner)). * gnu/tests/base.scm (run-basic-test) (run-cleanup-test, run-mcron-test, run-nss-mdns-test): Likewise. * gnu/tests/ci.scm (run-laminar-test): Likewise. * gnu/tests/cups.scm (run-cups-test): Likewise. * gnu/tests/databases.scm (run-memcached-test) (run-postgresql-test, run-mysql-test): Likewise. * gnu/tests/desktop.scm (run-elogind-test): Likewise. * gnu/tests/dict.scm (run-dicod-test): Likewise. * gnu/tests/docker.scm (run-docker-test): Likewise. (run-docker-system-test): Likewise. * gnu/tests/file-sharing.scm (run-transmission-daemon-test): Likewise. * gnu/tests/ganeti.scm (run-ganeti-test): Likewise. * gnu/tests/guix.scm (run-guix-build-coordinator-test): Likewise. (run-guix-data-service-test): Likewise. * gnu/tests/ldap.scm (run-ldap-test): Likewise. * gnu/tests/linux-modules.scm (run-loadable-kernel-modules-test-base): Likewise. * gnu/tests/mail.scm (run-opensmtpd-test) (run-exim-test, run-dovecot-test, run-getmail-test): Likewise. * gnu/tests/messaging.scm (run-xmpp-test) (run-bitlbee-test, run-quassel-test): Likewise. * gnu/tests/monitoring.scm (run-prometheus-node-exporter-server-test) (run-zabbix-server-test): Likewise. * gnu/tests/networking.scm (run-inetd-test, run-openvswitch-test) (run-dhcpd-test, run-tor-test, run-iptables-test, run-ipfs-test): Likewise. * gnu/tests/nfs.scm (run-nfs-test) (run-nfs-server-test, run-nfs-root-fs-test): Likewise. * gnu/tests/package-management.scm (run-nix-test): Likewise. * gnu/tests/reconfigure.scm (run-switch-to-system-test) (run-upgrade-services-test, run-install-bootloader-test): Likewise. * gnu/tests/rsync.scm (run-rsync-test): Likewise. * gnu/tests/security-token.scm (run-pcscd-test): Likewise. * gnu/tests/singularity.scm (run-singularity-test): Likewise. * gnu/tests/ssh.scm (run-ssh-test): Likewise. * gnu/tests/telephony.scm (run-jami-test): Likewise. * gnu/tests/version-control.scm (run-cgit-test): Likewise. (run-git-http-test, run-gitolite-test, run-gitile-test): Likewise. * gnu/tests/virtualization.scm (run-libvirt-test, run-childhurd-test): Likewise. * gnu/tests/web.scm (run-webserver-test, run-php-fpm-test) (run-hpcguix-web-server-test, run-tailon-test, run-patchwork-test): Likewise. Ludovic Courtès
2020-02-22marionette: Provide portable US-layout keystrokes for "<" and ">"....* gnu/build/marionette.scm (%qwerty-us-keystrokes): Use shit-comma and shift-dot for #\< and #\> because the "less" key doesn't work the same in "US intl." layouts. Ludovic Courtès
2020-02-22marionette: 'wait-for' procedures no longer leak a port....* gnu/build/marionette.scm (wait-for-tcp-port): Close SOCK upon success. (wait-for-unix-socket): Likewise. Ludovic Courtès
2019-05-15marionette: Add braces to the keystrokes....* gnu/build/marionette.scm (%qwerty-us-keystrokes): Add braces. Ludovic Courtès
2018-08-28marionette: Add wait-for-unix-socket....* gnu/build/marionette.scm (wait-for-unix-socket): New variable. Chris Marusich
2018-08-28marionette: Add support for QEMU's "quit" command....* gnu/build/marionette.scm (marionette-control): Don't wait for the monitor prompt when the command was "quit". Chris Marusich
2018-06-01marionette: Add 'wait-for-tcp-port'....* gnu/build/marionette.scm (wait-for-tcp-port): New procedure. * gnu/tests/dict.scm (run-dicod-test)["connect inside"]: Use it instead of the inline loop. Ludovic Courtès
2018-02-19marionette: Use QEMU's "VM channel" mechanism....* gnu/tests.scm (<marionette-configuration>)[device]: Default to "/dev/virtio-ports/org.gnu.guix.port.0". * gnu/tests.scm (marionette-shepherd-service): Remove (guix build syscalls) from 'modules'. Remove 'tcsetattr' call from 'start'. * gnu/build/marionette.scm (make-marionette): Use "-virtserialport" instead of "-virtconsole". Ludovic Courtès
2017-09-08marionette: 'wait-for-file' can be passed a read procedure....* gnu/build/marionette.scm (wait-for-file): Add #:read parameter and honor it. * gnu/tests/base.scm (run-basic-test)["login on tty1"]: Use 'wait-for-file' instead of inline code. Ludovic Courtès
2017-08-28marionette: Augment the set of keystrokes....* gnu/build/marionette.scm (%qwerty-us-keystrokes): Add ', ", and `. Ludovic Courtès
2017-08-28marionette: Fix typing of capital letters....Previously we'd use "sendkey P" instead of "sendkey shift-p", which had no effect. * gnu/build/marionette.scm (character->keystroke): New procedure. (string->keystroke-commands): Use it. Ludovic Courtès
2017-08-28marionette: 'wait-for-file' really raises an error when a file is missing....* gnu/build/marionette.scm (wait-for-file): Arrange to call 'error' on the host, not in the guest. Ludovic Courtès
2017-06-12marionette: Factorize 'wait-for-file'....* gnu/build/marionette.scm (wait-for-file): New procedure. * gnu/tests/base.scm (run-mcron-test)[test](wait-for-file): Remove. Pass second argument in 'wait-for-file' calls. * gnu/tests/ssh.scm (run-ssh-test)[test](wait-for-file): Remove. Pass second argument in 'wait-for-file' calls. * gnu/tests/messaging.scm (run-xmpp-test)[test](guest-wait-for-file): Remove. Use 'wait-for-file' instead, with second argument. Ludovic Courtès
2016-11-23install: Enable "cryptodisk" handling in GRUB....This allows 'grub-install' to do the right thing when / or /boot is a LUKS-encrypted partition. Fixes <http://bugs.gnu.org/21843>. * gnu/build/install.scm (install-grub): Add 'setenv' to set 'GRUB_ENABLE_CRYPTODISK'. (wait-for-screen-text): New test. * gnu/tests/base.scm (run-basic-test): Add #:initialization parameter and honor it. * gnu/tests/install.scm (%encrypted-root-os)[kernel-arguments]: Remove. (%encrypted-root-installation-script): Pass '--uuid' to 'cryptsetup luksFormat'. Remove 'sed' invocation. (enter-luks-passphrase): New procedure. (%test-encrypted-os)[value]: Pass #:initialization to 'run-basic-test'. Ludovic Courtès
2016-11-23marionette: Add 'marionette-screen-text' using OCR....* gnu/build/marionette.scm (marionette-screen-text): New procedure. * gnu/tests/base.scm (run-basic-test)["screen text"]: New test. Ludovic Courtès
2016-11-23marionette: Delay synchronization with the host's REPL....* gnu/build/marionette.scm (<marionette>)[marionette-repl]: Rename to... [%marionette-repl]: ... this. (marionette-repl): New macro. (make-marionette): Wrap last 'read' call into 'delay', making the last argument to 'marionette' a promise of a port. (marionette-eval): Use 'force' in 'match' clause. Ludovic Courtès
2016-11-22marionette: Avoid use of SIGALRM for timeouts....* gnu/build/marionette.scm (make-marionette)[accept*]: New procedures. Remove calls to 'sigaction'. Use 'accept*' instead of 'accept'. Ludovic Courtès
2016-05-04Add (gnu tests) and (gnu build marionette)....* gnu/build/marionette.scm, gnu/tests.scm: New files. * gnu/local.mk (GNU_SYSTEM_MODULES): Add them. * gnu/system/vm.scm (common-qemu-options): Remove '-serial stdio'. Ludovic Courtès