`runNixOSTest` fails on Darwin (` tests.testers.runNixOSTest-example` fails to build)
ShamrockLee opened this issue · 6 comments
Describe the bug
#282401 should have made NixOS Tests available on Darwin. This should include package tests produced via tester runNixOSTest
, but the OfBorg build result shows it isn't. An example is tests.testers.runNixOSTest-example
error: a 'x86_64-linux' with features {} is required to build '/nix/store/rsjmz848mv48kil2s92vnzy4n7q53rcz-builder.pl.drv', but I am a 'aarch64-darwin' with features {benchmark, big-parallel, nixos-test}
See the OfBorg test result in #292759.
Steps To Reproduce
Steps to reproduce the behavior on MacOS:
- Set up Nix on MacOS
git clone https://github.com/NixOS/nixpkgs.git
cd nixpkgs
- Checkout commit
- Build
tests.testers.runNixOSTest-example
- See build failure
Steps to reproduce the behavior on GitHub:
- Go to #292759 or any PR targeting the Nixpkgs master branch.
- Comment
@ofborg build tests.testers.runNixOSTest-example
Expected behavior
Package tests written by testers.runNixOSTest
, including tests.testers.runNixOSTest-example
, should run on MacOS. Related OfBorg build should be green.
Screenshots
Additional context
OfBorg build log links:
x86_64-darwin
https://logs.ofborg.org/?key=nixos/nixpkgs.292759&attempt_id=932a1ae7-c6fa-4f38-bd08-6f26b23ed12a
Notify maintainers
Metadata
Please run nix-shell -p nix-info --run "nix-info -m"
and paste the result.
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
output here
Add a 👍 reaction to issues you find important.
The macOS support for NixOS tests only adds support for running them but not building them. You still need access to a Linux builder to build those tests.
Thanks for the quick response!
The macOS support for NixOS tests only adds support for running them but not building them. You still need access to a Linux builder to build those tests.
What's the difficulty to build NixOS tests on macOS? Isn't it just a QEMU virtual machine?
It is possible to build Linux products on NixOS using something like darwin.linux-builder
but we don't yet have a way to do that in the course of a Nix build. See:
https://nixos.org/manual/nixpkgs/unstable/#sec-darwin-builder