lib/tests: Add check-eval.nix to run simple tests.

This can be used by evaluation-only tools to validate tests are still
working.
This commit is contained in:
Shea Levy 2018-03-04 06:28:49 -05:00
parent 2069a2a002
commit f1eb2f35a6
No known key found for this signature in database
GPG Key ID: 5C0BD6957D86FE27

7
lib/tests/check-eval.nix Normal file
View File

@ -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)