summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2018-03-04 06:28:49 -0500
committerShea Levy <shea@shealevy.com>2018-03-04 06:28:49 -0500
commitf1eb2f35a6c06c22d5299eb39ab9ce5b88008605 (patch)
tree2852b5fe1a16b2565a45bf4fa2761432ed29df7a /lib
parent2069a2a002d9b90c6444a827abbb3dd9016ebac6 (diff)
downloadnixlib-f1eb2f35a6c06c22d5299eb39ab9ce5b88008605.tar
nixlib-f1eb2f35a6c06c22d5299eb39ab9ce5b88008605.tar.gz
nixlib-f1eb2f35a6c06c22d5299eb39ab9ce5b88008605.tar.bz2
nixlib-f1eb2f35a6c06c22d5299eb39ab9ce5b88008605.tar.lz
nixlib-f1eb2f35a6c06c22d5299eb39ab9ce5b88008605.tar.xz
nixlib-f1eb2f35a6c06c22d5299eb39ab9ce5b88008605.tar.zst
nixlib-f1eb2f35a6c06c22d5299eb39ab9ce5b88008605.zip
lib/tests: Add check-eval.nix to run simple tests.
This can be used by evaluation-only tools to validate tests are still
working.
Diffstat (limited to 'lib')
-rw-r--r--lib/tests/check-eval.nix7
1 files changed, 7 insertions, 0 deletions
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)