nixos/testing: Fix release.nix tests evaluation

Fixes the problem introduced by 12b3066aae46a8ccc3d21f54f668a3f4be344332
which caused nixos/release.nix to return the wrong attributes, while
intending to only affect nixos/lib's runTest.
This also removes callTest from the test options, because callTest is
only ever invoked by all-tests.nix.

Changed files
+8 -12
nixos
pkgs
build-support
testers
+2 -2
nixos/lib/testing-python.nix
···
, extraPythonPackages ? (_ : [])
, interactive ? {}
} @ t:
-
runTest {
+
(evalTest {
imports = [
{ _file = "makeTest parameters"; config = t; }
{
···
};
}
];
-
};
+
}).config;
simpleTest = as: (makeTest as).test;
+1 -5
nixos/lib/testing/call-test.nix
···
in
{
options = {
-
callTest = mkOption {
-
internal = true;
-
type = types.functionTo types.raw;
-
};
result = mkOption {
internal = true;
-
default = config.test;
+
default = config;
};
};
}
+1 -1
nixos/lib/testing/default.nix
···
let
evalTest = module: lib.evalModules { modules = testModules ++ [ module ]; };
-
runTest = module: (evalTest module).config.result;
+
runTest = module: (evalTest ({ config, ... }: { imports = [ module ]; result = config.test; })).config.result;
testModules = [
./call-test.nix
+3 -3
nixos/tests/all-tests.nix
···
inherit
(rec {
-
doRunTest = arg: (import ../lib/testing-python.nix { inherit system pkgs; }).runTest {
-
imports = [ arg { inherit callTest; } ];
-
};
+
doRunTest = arg: ((import ../lib/testing-python.nix { inherit system pkgs; }).evalTest {
+
imports = [ arg ];
+
}).config.result;
findTests = tree:
if tree?recurseForDerivations && tree.recurseForDerivations
then
+1 -1
pkgs/build-support/testers/default.nix
···
else test;
calledTest = lib.toFunction loadedTest pkgs;
in
-
nixosTesting.makeTest calledTest;
+
nixosTesting.simpleTest calledTest;
}