From b0956b0ae3e89549a13b9a47dc3cbc5eba5f10af Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 17 Sep 2018 12:58:12 +0200 Subject: [PATCH] nixos tests doc: fix example statement False statements don't cause NixOS tests to fail, we need to throw an exception or terminate. --- nixos/doc/manual/development/writing-nixos-tests.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/doc/manual/development/writing-nixos-tests.xml b/nixos/doc/manual/development/writing-nixos-tests.xml index 5935fbc049b..983f8f9cbe3 100644 --- a/nixos/doc/manual/development/writing-nixos-tests.xml +++ b/nixos/doc/manual/development/writing-nixos-tests.xml @@ -108,7 +108,7 @@ xlink:href="https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/virtualis $machine->start; $machine->waitForUnit("default.target"); -$machine->succeed("uname") =~ /Linux/; +die unless $machine->succeed("uname") =~ /Linux/; The first line is actually unnecessary; machines are implicitly started when you first execute an action on them (such as waitForUnit