From fc9b7ae0024066130c9cc3b699e8b103e7c21d62 Mon Sep 17 00:00:00 2001 From: Yegor Timoshenko Date: Sun, 24 Dec 2017 11:44:48 +0000 Subject: [PATCH] tests: add evaluation/build test --- tests/build-test.nix | 10 ++++++++++ tests/build-test.sh | 8 ++++++++ 2 files changed, 18 insertions(+) create mode 100644 tests/build-test.nix create mode 100755 tests/build-test.sh 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 = [ ]; + + 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