diff --git a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml index b61a0268dee..d9ebbe74d54 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml @@ -569,8 +569,9 @@ The NixOS VM test framework, - pkgs.nixosTest/make-test-python.nix, - now requires detaching commands such as + pkgs.nixosTest/make-test-python.nix + (pkgs.testers.nixosTest since 22.05), now + requires detaching commands such as succeed("foo &") and succeed("foo | xclip -i") to close stdout. This can be done with a redirect such as diff --git a/nixos/doc/manual/release-notes/rl-2111.section.md b/nixos/doc/manual/release-notes/rl-2111.section.md index 310d32cfdd7..e673d6721a3 100644 --- a/nixos/doc/manual/release-notes/rl-2111.section.md +++ b/nixos/doc/manual/release-notes/rl-2111.section.md @@ -166,7 +166,7 @@ In addition to numerous new and upgraded packages, this release has the followin ## Backward Incompatibilities {#sec-release-21.11-incompatibilities} -- The NixOS VM test framework, `pkgs.nixosTest`/`make-test-python.nix`, now requires detaching commands such as `succeed("foo &")` and `succeed("foo | xclip -i")` to close stdout. +- The NixOS VM test framework, `pkgs.nixosTest`/`make-test-python.nix` (`pkgs.testers.nixosTest` since 22.05), now requires detaching commands such as `succeed("foo &")` and `succeed("foo | xclip -i")` to close stdout. This can be done with a redirect such as `succeed("foo >&2 &")`. This breaking change was necessitated by a race condition causing tests to fail or hang. It applies to all methods that invoke commands on the nodes, including `execute`, `succeed`, `fail`, `wait_until_succeeds`, `wait_until_fails`. diff --git a/nixos/lib/build-vms.nix b/nixos/lib/build-vms.nix index 05d9ce89dbd..18af49db177 100644 --- a/nixos/lib/build-vms.nix +++ b/nixos/lib/build-vms.nix @@ -38,7 +38,7 @@ rec { { key = "no-revision"; # Make the revision metadata constant, in order to avoid needless retesting. # The human version (e.g. 21.05-pre) is left as is, because it is useful - # for external modules that test with e.g. nixosTest and rely on that + # for external modules that test with e.g. testers.nixosTest and rely on that # version number. config.system.nixos.revision = mkForce "constant-nixos-revision"; } diff --git a/pkgs/build-support/trivial-builders/test/references.nix b/pkgs/build-support/trivial-builders/test/references.nix index 989722121cb..3e1eb16eecd 100644 --- a/pkgs/build-support/trivial-builders/test/references.nix +++ b/pkgs/build-support/trivial-builders/test/references.nix @@ -1,4 +1,4 @@ -{ lib, nixosTest, pkgs, writeText, hello, figlet, stdenvNoCC }: +{ lib, testers, pkgs, writeText, hello, figlet, stdenvNoCC }: # -------------------------------------------------------------------------- # # @@ -22,7 +22,7 @@ let lib.attrValues (import file { inherit pkgs; }) ); in -nixosTest { +testers.nixosTest { name = "nixpkgs-trivial-builders"; nodes.machine = { ... }: { virtualisation.writableStore = true; diff --git a/pkgs/test/nixos-functions/default.nix b/pkgs/test/nixos-functions/default.nix index 0c4869871e5..6f83858d01a 100644 --- a/pkgs/test/nixos-functions/default.nix +++ b/pkgs/test/nixos-functions/default.nix @@ -1,7 +1,7 @@ /* This file is a test that makes sure that the `pkgs.nixos` and -`pkgs.nixosTest` functions work. It's far from a perfect test suite, +`pkgs.testers.nixosTest` functions work. It's far from a perfect test suite, but better than not checking them at all on hydra. To run this test: