summaryrefslogtreecommitdiffstats
path: root/nixos/doc
diff options
context:
space:
mode:
authorJacek Galowicz <jacek@galowicz.de>2021-11-02 14:51:50 +0100
committerGitHub <noreply@github.com>2021-11-02 14:51:50 +0100
commit2ba07329882495ba2f9ca3def8b1c3d2d33c4e37 (patch)
tree3a887a8418fa84bb805d98e7d85f108b8158e892 /nixos/doc
parent38ff77cfbb93085fbbd6553b6c1cbdc761b4b57f (diff)
parentc2bdad7ab60d61162d65eea94d06b537104e21a3 (diff)
Merge pull request #142747 from helsinki-systems/fix/test-runner-execute
nixos/test-runner: Fix execute() flakiness
Diffstat (limited to 'nixos/doc')
-rw-r--r--nixos/doc/manual/development/writing-nixos-tests.section.md5
-rw-r--r--nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml8
2 files changed, 12 insertions, 1 deletions
diff --git a/nixos/doc/manual/development/writing-nixos-tests.section.md b/nixos/doc/manual/development/writing-nixos-tests.section.md
index 8471e7608af9..bf80099f1a27 100644
--- a/nixos/doc/manual/development/writing-nixos-tests.section.md
+++ b/nixos/doc/manual/development/writing-nixos-tests.section.md
@@ -159,6 +159,11 @@ The following methods are available on machine objects:
`execute`
: Execute a shell command, returning a list `(status, stdout)`.
+ Takes an optional parameter `check_return` that defaults to `True`.
+ Setting this parameter to `False` will not check for the return code
+ and return -1 instead. This can be used for commands that shut down
+ the VM and would therefore break the pipe that would be used for
+ retrieving the return code.
`succeed`
diff --git a/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml b/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml
index 83a96d5bb224..a3b63422433e 100644
--- a/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml
+++ b/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml
@@ -266,7 +266,13 @@ start_all()
<listitem>
<para>
Execute a shell command, returning a list
- <literal>(status, stdout)</literal>.
+ <literal>(status, stdout)</literal>. Takes an optional
+ parameter <literal>check_return</literal> that defaults to
+ <literal>True</literal>. Setting this parameter to
+ <literal>False</literal> will not check for the return code
+ and return -1 instead. This can be used for commands that shut
+ down the VM and would therefore break the pipe that would be
+ used for retrieving the return code.
</para>
</listitem>
</varlistentry>