diff options
Diffstat (limited to 'pkgs/test/stdenv')
-rw-r--r-- | pkgs/test/stdenv/default.nix | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/pkgs/test/stdenv/default.nix b/pkgs/test/stdenv/default.nix index 5ff18298f217a..bad6eb7ba7aa3 100644 --- a/pkgs/test/stdenv/default.nix +++ b/pkgs/test/stdenv/default.nix @@ -4,7 +4,8 @@ { stdenv , pkgs , lib -, +, runCommand +, testers }: let @@ -99,6 +100,25 @@ in # tests for hooks in `stdenv.defaultNativeBuildInputs` hooks = lib.recurseIntoAttrs (import ./hooks.nix { stdenv = bootStdenv; pkgs = earlyPkgs; }); + outputs-no-out = runCommand "outputs-no-out-assert" { + result = testers.testBuildFailure (stdenv.mkDerivation { + NIX_DEBUG = 1; + name = "outputs-no-out"; + outputs = ["foo"]; + buildPhase = ":"; + installPhase = '' + touch $foo + ''; + }); + + # Assumption: the first output* variable to be configured is + # _overrideFirst outputDev "dev" "out" + expectedMsg = "_assignFirst: could not find a non-empty variable to assign to outputDev. The following variables were all unset or empty: dev out."; + } '' + grep -F "$expectedMsg" $result/testBuildFailure.log >/dev/null + touch $out + ''; + test-env-attrset = testEnvAttrset { name = "test-env-attrset"; stdenv' = bootStdenv; }; # Test compatibility with derivations using `env` as a regular variable. |