lol

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.

+8 -12
+2 -2
nixos/lib/testing-python.nix
··· 49 49 , extraPythonPackages ? (_ : []) 50 50 , interactive ? {} 51 51 } @ t: 52 - runTest { 52 + (evalTest { 53 53 imports = [ 54 54 { _file = "makeTest parameters"; config = t; } 55 55 { ··· 59 59 }; 60 60 } 61 61 ]; 62 - }; 62 + }).config; 63 63 64 64 simpleTest = as: (makeTest as).test; 65 65
+1 -5
nixos/lib/testing/call-test.nix
··· 4 4 in 5 5 { 6 6 options = { 7 - callTest = mkOption { 8 - internal = true; 9 - type = types.functionTo types.raw; 10 - }; 11 7 result = mkOption { 12 8 internal = true; 13 - default = config.test; 9 + default = config; 14 10 }; 15 11 }; 16 12 }
+1 -1
nixos/lib/testing/default.nix
··· 2 2 let 3 3 4 4 evalTest = module: lib.evalModules { modules = testModules ++ [ module ]; }; 5 - runTest = module: (evalTest module).config.result; 5 + runTest = module: (evalTest ({ config, ... }: { imports = [ module ]; result = config.test; })).config.result; 6 6 7 7 testModules = [ 8 8 ./call-test.nix
+3 -3
nixos/tests/all-tests.nix
··· 45 45 46 46 inherit 47 47 (rec { 48 - doRunTest = arg: (import ../lib/testing-python.nix { inherit system pkgs; }).runTest { 49 - imports = [ arg { inherit callTest; } ]; 50 - }; 48 + doRunTest = arg: ((import ../lib/testing-python.nix { inherit system pkgs; }).evalTest { 49 + imports = [ arg ]; 50 + }).config.result; 51 51 findTests = tree: 52 52 if tree?recurseForDerivations && tree.recurseForDerivations 53 53 then
+1 -1
pkgs/build-support/testers/default.nix
··· 67 67 else test; 68 68 calledTest = lib.toFunction loadedTest pkgs; 69 69 in 70 - nixosTesting.makeTest calledTest; 70 + nixosTesting.simpleTest calledTest; 71 71 72 72 }