From f1eb2f35a6c06c22d5299eb39ab9ce5b88008605 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Sun, 4 Mar 2018 06:28:49 -0500 Subject: [PATCH] lib/tests: Add check-eval.nix to run simple tests. This can be used by evaluation-only tools to validate tests are still working. --- lib/tests/check-eval.nix | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 lib/tests/check-eval.nix diff --git a/lib/tests/check-eval.nix b/lib/tests/check-eval.nix new file mode 100644 index 000000000000..8bd7b605a39b --- /dev/null +++ b/lib/tests/check-eval.nix @@ -0,0 +1,7 @@ +# Throws an error if any of our lib tests fail. + +let tests = [ "misc" "systems" ]; + all = builtins.concatLists (map (f: import (./. + "/${f}.nix")) tests); +in if all == [] + then null + else throw (builtins.toJSON all)