0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

Merge pull request #144872 from hercules-ci/fix-nixosTests-chromium-xclip-blocked

nixosTests.chromium: unblock
This commit is contained in:
Robert Hensing 2021-11-06 16:21:20 +01:00 committed by GitHub
commit e62c9ce932
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 10 deletions

View file

@ -162,7 +162,9 @@ The following methods are available on machine objects:
If the command detaches, it must close stdout, as `execute` will wait If the command detaches, it must close stdout, as `execute` will wait
for this to consume all output reliably. This can be achieved by for this to consume all output reliably. This can be achieved by
redirecting stdout to stderr `>&2`, to `/dev/console`, `/dev/null` or redirecting stdout to stderr `>&2`, to `/dev/console`, `/dev/null` or
a file. a file. Examples of detaching commands are `sleep 365d &`, where the
shell forks a new process that can write to stdout and `xclip -i`, where
the `xclip` command itself forks without closing stdout.
Takes an optional parameter `check_return` that defaults to `True`. Takes an optional parameter `check_return` that defaults to `True`.
Setting this parameter to `False` will not check for the return code 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 and return -1 instead. This can be used for commands that shut down
@ -183,7 +185,8 @@ The following methods are available on machine objects:
- Dereferencing unset variables fail the command. - Dereferencing unset variables fail the command.
- It will wait for stdout to be closed. See `execute`. - It will wait for stdout to be closed. See `execute` for the
implications.
`fail` `fail`

View file

@ -271,8 +271,13 @@ start_all()
for this to consume all output reliably. This can be achieved for this to consume all output reliably. This can be achieved
by redirecting stdout to stderr <literal>&gt;&amp;2</literal>, by redirecting stdout to stderr <literal>&gt;&amp;2</literal>,
to <literal>/dev/console</literal>, to <literal>/dev/console</literal>,
<literal>/dev/null</literal> or a file. Takes an optional <literal>/dev/null</literal> or a file. Examples of detaching
parameter <literal>check_return</literal> that defaults to commands are <literal>sleep 365d &amp;</literal>, where the
shell forks a new process that can write to stdout and
<literal>xclip -i</literal>, where the
<literal>xclip</literal> command itself forks without closing
stdout. Takes an optional parameter
<literal>check_return</literal> that defaults to
<literal>True</literal>. Setting this parameter to <literal>True</literal>. Setting this parameter to
<literal>False</literal> will not check for the return code <literal>False</literal> will not check for the return code
and return -1 instead. This can be used for commands that shut and return -1 instead. This can be used for commands that shut
@ -314,7 +319,7 @@ start_all()
<listitem> <listitem>
<para> <para>
It will wait for stdout to be closed. See It will wait for stdout to be closed. See
<literal>execute</literal>. <literal>execute</literal> for the implications.
</para> </para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>

View file

@ -450,9 +450,10 @@
<para> <para>
The NixOS VM test framework, The NixOS VM test framework,
<literal>pkgs.nixosTest</literal>/<literal>make-test-python.nix</literal>, <literal>pkgs.nixosTest</literal>/<literal>make-test-python.nix</literal>,
now requires non-terminating commands such as now requires detaching commands such as
<literal>succeed(&quot;foo &amp;&quot;)</literal> to close <literal>succeed(&quot;foo &amp;&quot;)</literal> and
stdout. This can be done with a redirect such as <literal>succeed(&quot;foo | xclip -i&quot;)</literal> to
close stdout. This can be done with a redirect such as
<literal>succeed(&quot;foo &gt;&amp;2 &amp;&quot;)</literal>. <literal>succeed(&quot;foo &gt;&amp;2 &amp;&quot;)</literal>.
This breaking change was necessitated by a race condition This breaking change was necessitated by a race condition
causing tests to fail or hang. It applies to all methods that causing tests to fail or hang. It applies to all methods that

View file

@ -133,7 +133,7 @@ In addition to numerous new and upgraded packages, this release has the followin
## Backward Incompatibilities {#sec-release-21.11-incompatibilities} ## Backward Incompatibilities {#sec-release-21.11-incompatibilities}
- The NixOS VM test framework, `pkgs.nixosTest`/`make-test-python.nix`, now requires non-terminating commands such as `succeed("foo &")` to close stdout. - 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.
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. 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`. It applies to all methods that invoke commands on the nodes, including `execute`, `succeed`, `fail`, `wait_until_succeeds`, `wait_until_fails`.

View file

@ -215,7 +215,7 @@ mapAttrs (channel: chromiumPkg: makeTest rec {
clipboard = machine.succeed( clipboard = machine.succeed(
ru( ru(
"echo void | ${pkgs.xclip}/bin/xclip -i" "echo void | ${pkgs.xclip}/bin/xclip -i >&2"
) )
) )
machine.succeed( machine.succeed(