Skip to content

Commit

Permalink
nixos/tests/avahi: Fix evaluation
Browse files Browse the repository at this point in the history
In commit a61ca03 (#100267), the avahi
test expression got an additional attribute, but instead of wrapping the
function, the attributes were introduced by nesting the function one
level deeper.

To illustrate this:

  Before: attrs: <testdrv>
  After:  newattrs: attrs: <testdrv>

So when instantiating tests.avahi.x86_64-linux from nixos/release.nix we
get "value is a function while a set was expected" instead of the
derivation.

I simply re-passed the attributes to make-test-python.nix, since the
function already allows (via "...") arbitrary attributes to be passed.

The reason why I'm pushing this directly to master is because evaluation
for the test is already broken and the worst that could happen here is
that things are *still* broken.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @flokli, @doronbehar
  • Loading branch information
aszlig committed Oct 20, 2020
1 parent c4237e2 commit 8ea168d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions nixos/tests/avahi.nix
Expand Up @@ -2,10 +2,11 @@
, config ? {}
, pkgs ? import ../.. { inherit system config; }
# bool: whether to use networkd in the tests
, networkd ? false }:
, networkd ? false
} @ args:

# Test whether `avahi-daemon' and `libnss-mdns' work as expected.
import ./make-test-python.nix ({ ... } : {
import ./make-test-python.nix {
name = "avahi";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ eelco ];
Expand Down Expand Up @@ -75,4 +76,4 @@ import ./make-test-python.nix ({ ... } : {
two.succeed("avahi-browse -r -t _ssh._tcp | tee out >&2")
two.succeed("test `wc -l < out` -gt 0")
'';
})
} args

0 comments on commit 8ea168d

Please sign in to comment.