Merge pull request #36287 from shlevy/lib-tests-default

lib/tests: Add check-eval.nix to run simple tests.
This commit is contained in:
Graham Christensen 2018-09-16 18:38:47 -04:00 committed by GitHub
commit 4c7f0714c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)