summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYegor Timoshenko <yegortimoshenko@gmail.com>2017-12-24 11:44:48 +0000
committerYegor Timoshenko <yegortimoshenko@gmail.com>2017-12-24 11:45:48 +0000
commitfc9b7ae0024066130c9cc3b699e8b103e7c21d62 (patch)
tree3d811ed3c26a4b6c17907f1ddaa0831a0271a80c /tests
parent2951a4f4b0b33ae266d0cd98f693023c6ed99577 (diff)
tests: add evaluation/build test
Diffstat (limited to 'tests')
-rw-r--r--tests/build-test.nix10
-rwxr-xr-xtests/build-test.sh8
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/build-test.nix b/tests/build-test.nix
new file mode 100644
index 0000000..936259f
--- /dev/null
+++ b/tests/build-test.nix
@@ -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";
+ };
+}
diff --git a/tests/build-test.sh b/tests/build-test.sh
new file mode 100755
index 0000000..bd762a5
--- /dev/null
+++ b/tests/build-test.sh
@@ -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