summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2011-03-21 13:01:23 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2011-03-21 13:01:23 +0000
commitf10376611e1f98348f33858dae07e24f63cfbeb9 (patch)
tree4fdc0c952b7c66f495cc2081db5aeb712e587285 /tests
parentc430bf5cc304945f152be81efd0a59ef28353388 (diff)
downloadnixpkgs-f10376611e1f98348f33858dae07e24f63cfbeb9.tar
nixpkgs-f10376611e1f98348f33858dae07e24f63cfbeb9.tar.gz
nixpkgs-f10376611e1f98348f33858dae07e24f63cfbeb9.tar.bz2
nixpkgs-f10376611e1f98348f33858dae07e24f63cfbeb9.tar.lz
nixpkgs-f10376611e1f98348f33858dae07e24f63cfbeb9.tar.xz
nixpkgs-f10376611e1f98348f33858dae07e24f63cfbeb9.tar.zst
nixpkgs-f10376611e1f98348f33858dae07e24f63cfbeb9.zip
* 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
Diffstat (limited to 'tests')
-rw-r--r--tests/avahi.nix31
1 files 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");
     '';
 }