diff options
author | Yegor Timoshenko <yegortimoshenko@gmail.com> | 2017-12-24 22:21:53 +0000 |
---|---|---|
committer | Yegor Timoshenko <yegortimoshenko@gmail.com> | 2017-12-24 22:21:53 +0000 |
commit | b63e0eb372b00d4cb5ca552ae9583bdb593f07dd (patch) | |
tree | fefff4e0f943b7432d173872f61ca25ea3ea67b9 /tests | |
parent | 8abb6374c10de9e174722733faa7c3e4f40a9c7f (diff) |
Revert "tests: move to _tests"
This reverts commit 4d498aff1a147f06d71a8e96d17bbba9df5ae926.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/eval-test.nix | 15 | ||||
-rwxr-xr-x | tests/eval-test.sh | 18 |
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 |