about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2018-10-22T19·49+0200
committerEelco Dolstra <edolstra@gmail.com>2018-10-22T23·29+0200
commit3cd15c5b1f5a8e6de87d5b7e8cc2f1326b420c88 (patch)
treef9cfa72b41c768d19d26908865424af3f135e248 /tests
parent7a9ac91a43e1e05e9df9d1b9b4a2cf322d62bb1c (diff)
Per-output reference and closure size checks
In structured-attributes derivations, you can now specify per-output
checks such as:

  outputChecks."out" = {
    # The closure of 'out' must not be larger than 256 MiB.
    maxClosureSize = 256 * 1024 * 1024;

    # It must not refer to C compiler or to the 'dev' output.
    disallowedRequisites = [ stdenv.cc "dev" ];
  };

  outputChecks."dev" = {
    # The 'dev' output must not be larger than 128 KiB.
    maxSize = 128 * 1024;
  };

Also fixed a bug in allowedRequisites that caused it to ignore
self-references.
Diffstat (limited to 'tests')
-rw-r--r--tests/check-reqs.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/check-reqs.nix b/tests/check-reqs.nix
index 41436cb48e08..47b5b3d9c723 100644
--- a/tests/check-reqs.nix
+++ b/tests/check-reqs.nix
@@ -33,7 +33,7 @@ rec {
   };
 
   # When specifying all the requisites, the build succeeds.
-  test1 = makeTest 1 [ dep1 dep2 deps ];
+  test1 = makeTest 1 [ "out" dep1 dep2 deps ];
 
   # But missing anything it fails.
   test2 = makeTest 2 [ dep2 deps ];