News for hackers. Stuff that matters.
Re:An EPYC NixOS Build Farm by aseipp on Saturday August 18, 2018 @05:49PM (#17790970)
It's our custom tool. NixOS has testing infrastructure built on top of QEMU, and you can use Perl scripts like this in order to automate aspects of testing inside that environment by talking to the QEMU monitor -- for example, you can not only wait for a window, but click a button in that window, then also wait for a service to start afterwords, for example. (If you were testing GUI functionality).

Tests are written in a mix of Nix and Perl automation scripts like this; the Perl scripts control QEMU, but the Nix code describes what is put into the disk images. It's fairly bespoke and tuned to our own needs. The source code for the Perl driver is here: https://github.com/NixOS/nixpkgs/blob/f148c5c4a1ffa353836bfd...

It can even do multi-machine test setups as another comment pointed out, and it's pretty fun for writing functional demonstrations; for example I've been meaning to use these tools to write examples of doing PostgreSQL replication and failover, etc.

Re:An EPYC NixOS Build Farm by chris_st on Saturday August 18, 2018 @07:21PM (#17791422)
Thanks very much for this information (you and @grhmc).

PLEASE consider releasing some form of this tool, or at least documenting the snot out of it... it looks incredible. We'd really use this at work.

Re:An EPYC NixOS Build Farm by dezgeg on Saturday August 18, 2018 @08:56PM (#17791846)
The internals of the test framework are pretty heavily tied to Nix and NixOS, so a release independent of Nix(OS) isn't probably going to happen. With that said, the test infrastructure itself is exposed as library functions that any Nix user can use. And even though the test VMs itself will run NixOS, the host machine can be any Linux distro with Nix installed.
Re:An EPYC NixOS Build Farm by grhmc on Saturday August 18, 2018 @08:33PM (#17791751)
I think it would be really difficult to get such a good experience with something that isn't NixOS. You might look at things like:

- http://open.qa/ - TestKitchen

But I must recommend, indeed, taking a good hard took at NixOS! :)