nixos/test-driver: fix #153766#153866
Conversation
There was a problem hiding this comment.
I also thought about making the out-dir an optional parameter, defaulting to the PWD. Now the problem I thought of was, if a user runs the driver inside a directory without write-permission. The test-run will fail pretty late i.e. when screenshot or copy_from_vm is called. I found it nicer to fail as early as possible. The case can occur e.g. when someone does this:
nix-build . -A nixosTests.<test>.driver
cd result/bin
./nixos-test-driver
Here the result dir is a symlink to the nix store obviously...
There was a problem hiding this comment.
agree, but I think that check should be happening in the initialization of Driver, not in parsing the arguments. I rebased and pushed a new commit to fix this, please verify
901c109 to
28fa06f
Compare
28fa06f to
adf0844
Compare
|
Can we get rid of all accesses to environment variables, I already did that in https://github.com/NixOS/nixpkgs/pull/153854/files |
|
Hi, i tend to prefer the other PR, because it is already cleaned out from env var usage, and doesn't mix in the image stuff (which should be individually tested and merged for the record imho). |
|
I have some thoughts on the other one, but I'll leave them there. |
Motivation for this change
Fixes #153766, alternative to #153854
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes