Closed Synthetica9 closed 2 years ago
Seems to be because nix-shell sets $out
which is implicitly picked up by the driver...
@Synthetica9 I used the nixos/tests/yabar.nix test as a base for reproducing this and added a copy_from_vm call, similar to the test you wrote in your pull-request. I couldn't reproduce the error. Now I'm going to checkout your branch and run your test...
EDIT:
Now I can reproduce, I missed that you built the driver and then you ran it. When you just run nix-build . -A nixosTests.test everything works fine in a nix-shell.
Now the problem doesn't only occur inside a nix-shell, but also outside of it, where the out
environment-variable may not even be set. As a solution we could get rid of using the out environment-variable and introduce a command-line parameter --output-dir. When the test-driver is called in runTests we could pass in --output-dir $out
Describe the bug
A clear and concise description of what the bug is.
Steps To Reproduce
Steps to reproduce the behavior:
nix-shell -p hello
./result/bin/nixos-test-driver
Expected behavior
Driver runs normally, placing outputs in current directory.
Driver output:
Notify maintainers
... Now that we're packaging
test-driver
as a proper package we should probably also include a meta sectionAnyways: @marijanp @Artturin @cole-h