tests: add evaluation/build test

This commit is contained in:
Yegor Timoshenko 2017-12-24 11:44:48 +00:00
parent 2951a4f4b0
commit fc9b7ae002
No known key found for this signature in database
GPG key ID: C34BF9DCC9DF8210
2 changed files with 18 additions and 0 deletions

10
tests/build-test.nix Normal file
View file

@ -0,0 +1,10 @@
{
imports = [ <nixos-hardware-profile> ];
boot.loader.systemd-boot.enable = true;
fileSystems."/" = {
device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000";
fsType = "btrfs";
};
}

8
tests/build-test.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh
cd $(dirname $0)
for profile in $(find .. -name \*.nix); do
echo $profile >&2
nixos-rebuild -I nixos-config=build-test.nix -I nixos-hardware-profile=$profile dry-build
done