summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYegor Timoshenko <yegortimoshenko@gmail.com>2017-12-24 22:21:53 +0000
committerYegor Timoshenko <yegortimoshenko@gmail.com>2017-12-24 22:21:53 +0000
commitb63e0eb372b00d4cb5ca552ae9583bdb593f07dd (patch)
treefefff4e0f943b7432d173872f61ca25ea3ea67b9 /tests
parent8abb6374c10de9e174722733faa7c3e4f40a9c7f (diff)
Revert "tests: move to _tests"
Diffstat (limited to 'tests')
-rw-r--r--tests/eval-test.nix15
-rwxr-xr-xtests/eval-test.sh18
2 files changed, 33 insertions, 0 deletions
diff --git a/tests/eval-test.nix b/tests/eval-test.nix
new file mode 100644
index 0000000..e946b0b
--- /dev/null
+++ b/tests/eval-test.nix
@@ -0,0 +1,15 @@
+{
+ imports = [ <nixos-hardware-profile> ];
+
+ boot.loader.systemd-boot.enable = true;
+
+ fileSystems."/" = {
+ device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000";
+ fsType = "btrfs";
+ };
+
+ nixpkgs.config = {
+ allowBroken = true;
+ allowUnfree = true;
+ };
+}
diff --git a/tests/eval-test.sh b/tests/eval-test.sh
new file mode 100755
index 0000000..00970b7
--- /dev/null
+++ b/tests/eval-test.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+cd $(dirname $0)/..
+
+find=(find . -name default.nix)
+
+for profile in `${find[@]}`; do
+ echo evaluating $profile >&2
+
+ nixos-rebuild \
+ -I nixos-config=tests/eval-test.nix \
+ -I nixos-hardware-profile=$profile \
+ dry-build
+
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
+done