nixpkgs/nixos/lib/test-driver
Chuck 751a27020e nixos/test-driver: Specify /bin/sh shell when running a bourne shell script as the user
The test harness provides the commands it wishes to run in Bourne
syntax.  This fails if the user uses a different shell.  For example,
with fish:

  machine.wait_for_unit("graphical-session.target", "alice")

machine # fish: Unsupported use of '='. To run '-u`' with a modified environment, please use 'env XDG_RUNTIME_DIR=/run/user/`id -u`…'
machine # XDG_RUNTIME_DIR=/run/user/`id -u` systemctl --user --no-pager show "graphical-session.target"
machine # ^
machine # [   16.329957] su[1077]: pam_unix(su:session): session closed for user alice
error: retrieving systemctl info for unit "graphical-session.target" under user "alice" failed with exit code 127
2020-05-09 11:01:17 -07:00
..
Logger.pm test-driver: Logs time taken for nests 2019-01-11 22:36:31 -05:00
Machine.pm nixos-test-driver: allow configuration of net frontend and backend 2019-07-22 13:44:27 +03:00
test-driver.pl NixOS VM tests: Don't create a setgid group in vde_switch 2017-06-07 11:57:36 +02:00
test-driver.py nixos/test-driver: Specify /bin/sh shell when running a bourne shell script as the user 2020-05-09 11:01:17 -07:00