1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

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)