diff --git a/ci/eval/compare/default.nix b/ci/eval/compare/default.nix index 4d651afe092e..e596b6d1994f 100644 --- a/ci/eval/compare/default.nix +++ b/ci/eval/compare/default.nix @@ -172,6 +172,7 @@ let rebuildCountByKernel = lib.mapAttrs ( kernel: kernelRebuilds: lib.length kernelRebuilds ) rebuildsByKernel; + rebuildNames = extractPackageNames diffAttrs.rebuilds; in writeText "changed-paths.json" ( builtins.toJSON { @@ -188,7 +189,8 @@ let kernel: rebuilds: lib.nameValuePair "10.rebuild-${kernel}-stdenv" (lib.elem "stdenv" rebuilds) ) rebuildsByKernel // { - "10.rebuild-nixos-tests" = lib.elem "nixosTests.simple" (extractPackageNames diffAttrs.rebuilds); + "10.rebuild-nixos-tests" = + lib.elem "nixosTests.simple-container" rebuildNames || lib.elem "nixosTests.simple-vm" rebuildNames; }; } ); diff --git a/ci/eval/outpaths.nix b/ci/eval/outpaths.nix index 6c29ff403b47..afbce48f3321 100755 --- a/ci/eval/outpaths.nix +++ b/ci/eval/outpaths.nix @@ -108,6 +108,8 @@ in tweak ( (removeAttrs nixpkgsJobs blacklist) // { - nixosTests = lib.filterAttrs (name: _: name == "simple") nixosJobs.tests; + nixosTests = lib.filterAttrs ( + name: _: name == "simple-container" || name == "simple-vm" + ) nixosJobs.tests; } ) diff --git a/ci/github-script/check-target-branch.js b/ci/github-script/check-target-branch.js index cdb2670aeac0..01c062d410ab 100644 --- a/ci/github-script/check-target-branch.js +++ b/ci/github-script/check-target-branch.js @@ -99,7 +99,8 @@ async function checkTargetBranch({ github, context, core, dry }) { ...Object.values(changed.rebuildCountByKernel), ) const rebuildsAllTests = - changed.attrdiff.changed.includes('nixosTests.simple') + changed.attrdiff.changed.includes('nixosTests.simple-container') || + changed.attrdiff.changed.includes('nixosTests.simple-vm') // https://github.com/NixOS/nixpkgs/pull/481205#issuecomment-3790123921 // These should go to staging-nixos instead of master, diff --git a/nixos/release-combined.nix b/nixos/release-combined.nix index 40eb4a0d34ae..d6ec21f82226 100644 --- a/nixos/release-combined.nix +++ b/nixos/release-combined.nix @@ -202,7 +202,8 @@ rec { (onFullSupported "nixos.tests.proxy") (onFullSupported "nixos.tests.sddm.default") (onFullSupported "nixos.tests.shadow") - (onFullSupported "nixos.tests.simple") + (onFullSupported "nixos.tests.simple-container") + (onFullSupported "nixos.tests.simple-vm") (onFullSupported "nixos.tests.sway") (onFullSupported "nixos.tests.switchTest") (onFullSupported "nixos.tests.udisks2") diff --git a/nixos/release-small.nix b/nixos/release-small.nix index 461afb49d4db..8db36109abf7 100644 --- a/nixos/release-small.nix +++ b/nixos/release-small.nix @@ -67,7 +67,8 @@ rec { php predictable-interface-names proxy - simple + simple-container + simple-vm ; latestKernel = { inherit (nixos'.tests.latestKernel) @@ -165,7 +166,8 @@ rec { "nixos.tests.predictable-interface-names.unpredictable" "nixos.tests.predictable-interface-names.unpredictableNetworkd" "nixos.tests.proxy" - "nixos.tests.simple" + "nixos.tests.simple-container" + "nixos.tests.simple-vm" "nixpkgs.jdk" "nixpkgs.tests.stdenv.tests-stdenv-gcc-stageCompare" "nixpkgs.opensshTest" diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 3475d14e7f26..f4308311858c 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1508,7 +1508,8 @@ in shoko = import ./shoko.nix { inherit runTest; }; signal-desktop = runTest ./signal-desktop.nix; silverbullet = runTest ./silverbullet.nix; - simple = runTest ./simple.nix; + simple-container = runTest ./simple-container.nix; + simple-vm = runTest ./simple-vm.nix; sing-box = runTest ./sing-box.nix; sks = runTest ./sks.nix; slimserver = runTest ./slimserver.nix; diff --git a/nixos/tests/nixos-test-driver/skip-typecheck.nix b/nixos/tests/nixos-test-driver/skip-typecheck.nix index b36e4a819693..887cab290389 100644 --- a/nixos/tests/nixos-test-driver/skip-typecheck.nix +++ b/nixos/tests/nixos-test-driver/skip-typecheck.nix @@ -1,5 +1,5 @@ /** - nixosTests.simple, but with skipTypeCheck. + nixosTests.simple-vm, but with skipTypeCheck. This catches regressions in the wiring, e.g. https://github.com/NixOS/nixpkgs/pull/511225 */ diff --git a/nixos/tests/simple-container.nix b/nixos/tests/simple-container.nix new file mode 100644 index 000000000000..269853423651 --- /dev/null +++ b/nixos/tests/simple-container.nix @@ -0,0 +1,11 @@ +{ + name = "simple-container"; + + containers.machine = { }; + + testScript = '' + start_all() + machine.wait_for_unit("multi-user.target") + machine.shutdown() + ''; +} diff --git a/nixos/tests/simple.nix b/nixos/tests/simple-vm.nix similarity index 86% rename from nixos/tests/simple.nix rename to nixos/tests/simple-vm.nix index f9b9db05302b..51fe6b596d29 100644 --- a/nixos/tests/simple.nix +++ b/nixos/tests/simple-vm.nix @@ -1,5 +1,5 @@ { - name = "simple"; + name = "simple-vm"; nodes.machine = { };