Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 77752c6c0865
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5bdb653baf24
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jan 14, 2020

  1. test-driver.py: specify coreutils dependency

    Otherwise the driver script fails when coreutils are not in PATH.
    erikarvstedt authored and Jon committed Jan 14, 2020

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    dtzWill Will Dietz
    Copy the full SHA
    caa435f View commit details
  2. test-driver.py: fix decoding of VM output

    The codec format 'unicode_escape' was introduced in 52ee102 to handle
    undecodable bytes in boot menus.
    
    This made the problem worse as unicode chars outside of iso-8859-1
    produce garbled output and valid utf-8 strings (such as "\x" ) trigger
    decoding errors.
    
    Fix this by using the default 'utf-8' codec and by explicitly ignoring
    decoding errors.
    erikarvstedt authored and Jon committed Jan 14, 2020

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    dtzWill Will Dietz
    Copy the full SHA
    5bdb653 View commit details
Showing with 3 additions and 2 deletions.
  1. +2 −1 nixos/lib/test-driver/test-driver.py
  2. +1 −1 nixos/lib/testing-python.nix
3 changes: 2 additions & 1 deletion nixos/lib/test-driver/test-driver.py
Original file line number Diff line number Diff line change
@@ -704,7 +704,8 @@ def create_socket(path: str) -> socket.socket:

def process_serial_output() -> None:
for _line in self.process.stdout:
line = _line.decode("unicode_escape").replace("\r", "").rstrip()
# Ignore undecodable bytes that may occur in boot menus
line = _line.decode(errors="ignore").replace("\r", "").rstrip()
eprint("{} # {}".format(self.name, line))
self.logger.enqueue({"msg": line, "machine": self.name})

2 changes: 1 addition & 1 deletion nixos/lib/testing-python.nix
Original file line number Diff line number Diff line change
@@ -155,7 +155,7 @@ in rec {
--add-flags "''${vms[*]}" \
${lib.optionalString enableOCR
"--prefix PATH : '${ocrProg}/bin:${imagemagick_tiff}/bin'"} \
--run "export testScript=\"\$(cat $out/test-script)\"" \
--run "export testScript=\"\$(${coreutils}/bin/cat $out/test-script)\"" \
--set VLANS '${toString vlans}'
ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-run-vms
wrapProgram $out/bin/nixos-run-vms \