How to run the NixOS VM tests from nixpkgs?

I’m looking at and want to run some of the tests (just for playing around). That article mentions that I can nix-build -A nixosTests.bittorrent, but then I get

this path will be fetched (0.00 MiB download, 0.00 MiB unpacked):
copying path '/nix/store/v0y1prljam02d73anilynp36gadqd8rc-vm-test-run-bittorrent' from ''...

and a result symlink to that folder. The folder is empty, and the log output and the duration of the command execution suggest that the tests haven’t run yet.

That means the test result is cached. Try nix-build -A nixosTests.bittorrent --check to return them.

1 Like

Thanks! With --check it looks good.