From f10376611e1f98348f33858dae07e24f63cfbeb9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 21 Mar 2011 13:01:23 +0000 Subject: [PATCH] * Fix the Avahi test: the start condition for the backdoor changed, so it's now necessary to wait until networking is up. Also, don't print to stderr. svn path=/nixos/trunk/; revision=26441 --- tests/avahi.nix | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/tests/avahi.nix b/tests/avahi.nix index 9aac6fe2d21..d29e0ff77c6 100644 --- a/tests/avahi.nix +++ b/tests/avahi.nix @@ -22,39 +22,34 @@ with pkgs; '' startAll; # mDNS. - print STDERR - $one->mustSucceed("avahi-resolve-host-name one.local | tee out"); + $one->waitForJob("network-interfaces"); + $one->mustSucceed("avahi-resolve-host-name one.local | tee out >&2"); $one->mustSucceed("test \"`cut -f1 < out`\" = one.local"); - print STDERR - $one->mustSucceed("avahi-resolve-host-name two.local | tee out"); + $one->mustSucceed("avahi-resolve-host-name two.local | tee out >&2"); $one->mustSucceed("test \"`cut -f1 < out`\" = two.local"); - print STDERR - $two->mustSucceed("avahi-resolve-host-name one.local | tee out"); + $two->waitForJob("network-interfaces"); + $two->mustSucceed("avahi-resolve-host-name one.local | tee out >&2"); $two->mustSucceed("test \"`cut -f1 < out`\" = one.local"); - print STDERR - $two->mustSucceed("avahi-resolve-host-name two.local | tee out"); + $two->mustSucceed("avahi-resolve-host-name two.local | tee out >&2"); $two->mustSucceed("test \"`cut -f1 < out`\" = two.local"); # Basic DNS-SD. - print STDERR - $one->mustSucceed("avahi-browse -r -t _workstation._tcp | tee out"); + $one->mustSucceed("avahi-browse -r -t _workstation._tcp | tee out >&2"); $one->mustSucceed("test `wc -l < out` -gt 0"); - print STDERR - $two->mustSucceed("avahi-browse -r -t _workstation._tcp | tee out"); + $two->mustSucceed("avahi-browse -r -t _workstation._tcp | tee out >&2"); $two->mustSucceed("test `wc -l < out` -gt 0"); # More DNS-SD. $one->execute("avahi-publish -s \"This is a test\" _test._tcp 123 one=1 &"); $one->sleep(5); - print STDERR - $two->mustSucceed("avahi-browse -r -t _test._tcp | tee out"); + $two->mustSucceed("avahi-browse -r -t _test._tcp | tee out >&2"); $two->mustSucceed("test `wc -l < out` -gt 0"); # NSS-mDNS. - print STDERR $one->mustSucceed("getent hosts one.local"); - print STDERR $one->mustSucceed("getent hosts two.local"); - print STDERR $two->mustSucceed("getent hosts one.local"); - print STDERR $two->mustSucceed("getent hosts two.local"); + $one->mustSucceed("getent hosts one.local >&2"); + $one->mustSucceed("getent hosts two.local >&2"); + $two->mustSucceed("getent hosts one.local >&2"); + $two->mustSucceed("getent hosts two.local >&2"); ''; }