1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00
nixpkgs/nixos/lib
rnhmjoj f2929eb949
nixos/test-driver: drop logging from Machine.send_monitor_command
Several machine operations, like `send_chars` and `send_key`, are
implemented by calling `send_monitor_command`, possibly multiple times.
This generates a huge amount of unnecessary noise in the log, because
`send_monitor_command` is a low-level operation and an implementation
detail.

Here's an excerpt from a highlighted log before and afte the change.

Before:

    subtest: Can generate a PGP key
    machine: sending keys 'gpg --gen-key\n'
    machine: sending monitor command: sendkey g
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey g, in 0.00 seconds)
    machine: sending monitor command: sendkey p
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey p, in 0.00 seconds)
    machine: sending monitor command: sendkey g
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey g, in 0.00 seconds)
    machine: sending monitor command: sendkey spc
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey spc, in 0.00 seconds)
    machine: sending monitor command: sendkey 0x0C
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey 0x0C, in 0.00 seconds)
    machine: sending monitor command: sendkey 0x0C
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey 0x0C, in 0.00 seconds)
    machine: sending monitor command: sendkey g
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey g, in 0.00 seconds)
    machine: sending monitor command: sendkey e
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey e, in 0.00 seconds)
    machine: sending monitor command: sendkey n
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey n, in 0.00 seconds)
    machine: sending monitor command: sendkey 0x0C
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey 0x0C, in 0.00 seconds)
    machine: sending monitor command: sendkey k
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey k, in 0.00 seconds)
    machine: sending monitor command: sendkey e
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey e, in 0.00 seconds)
    machine: sending monitor command: sendkey y
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey y, in 0.00 seconds)
    machine: sending monitor command: sendkey ret
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey ret, in 0.00 seconds)
    (finished: sending keys 'gpg --gen-key\n', in 0.15 seconds)

After:

    subtest: Can generate a PGP key
    machine: sending keys 'gpg --gen-key\n'
    (finished: sending keys 'gpg --gen-key\n', in 0.15 seconds)
2023-02-07 08:40:54 +01:00
..
make-options-doc nixos-render-docs: add some better CLI infrastructure 2023-01-27 20:07:34 +01:00
test-driver nixos/test-driver: drop logging from Machine.send_monitor_command 2023-02-07 08:40:54 +01:00
testing Revert #178290: nixos/virtualisation: add option 2023-01-30 07:55:50 -08:00
default.nix nixos/testing: Move entrypoint to nixos/lib + doc 2022-09-24 17:38:08 +01:00
eval-cacheable-options.nix nixos/documentation: split options doc build 2022-01-02 19:46:13 +01:00
eval-config-minimal.nix nixos/lib: Clarify that nixos.evalModules impl is NOT experimental 2022-01-10 12:36:57 +01:00
eval-config.nix nixos/lib/eval-config: Document the use of baseModules 2022-09-24 17:38:09 +01:00
from-env.nix
make-channel.nix
make-disk-image.nix nixos/lib/make-disk-image: docs, UEFI vars recording, more determinism 2022-12-24 19:15:29 +01:00
make-ext4-fs.nix honor sdImage.compressImage in intermediate build steps 2021-12-21 21:31:44 +01:00
make-iso9660-image.nix
make-iso9660-image.sh installer/cd-dvd/iso-image: avoid leaking build timestamps on non-x86 2022-01-05 12:05:15 -06:00
make-multi-disk-zfs-image.nix nixos/lib/make-multi-disk-zfs-image.nix: remove unused binding 2022-09-26 22:18:55 -04:00
make-single-disk-zfs-image.nix nixos/lib/make-single-disk-zfs-image.nix: remove unused binding 2022-09-26 22:19:06 -04:00
make-squashfs.nix
make-system-tarball.nix make-system-tarball: use pixz -t 2022-08-22 05:28:36 +03:00
make-system-tarball.sh
qemu-common.nix nixos/lib/qemu-common.nix: set qemuSerialDevice for isMips64 2022-10-04 07:48:12 +00:00
systemd-lib.nix lib.replaceChars: warn about being a deprecated alias 2022-12-15 22:25:51 +02:00
systemd-types.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
systemd-unit-options.nix nixos/doc: fix some manpage references 2023-01-03 14:03:35 +01:00
test-script-prepend.py nixos/test-driver: Typecheck TestScript 2022-06-02 10:05:45 +02:00
testing-python.nix nixos/testing-python.nix: Help users who need specialArgs 2022-12-23 18:41:52 +01:00
utils.nix lib.replaceChars: warn about being a deprecated alias 2022-12-15 22:25:51 +02:00