summary refs log tree commit diff
path: root/tests/trac.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2010-01-05 23:59:29 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2010-01-05 23:59:29 +0000
commitbc68c2985c961147affd47b914fef32fa07ebe21 (patch)
treefbfc1b72b0d4241a5575bed4cd5ed686f153e67f /tests/trac.nix
parent5cc99487cbe337072f69ef3cd8b58c3f1aa16bcc (diff)
downloadnixpkgs-bc68c2985c961147affd47b914fef32fa07ebe21.tar
nixpkgs-bc68c2985c961147affd47b914fef32fa07ebe21.tar.gz
nixpkgs-bc68c2985c961147affd47b914fef32fa07ebe21.tar.bz2
nixpkgs-bc68c2985c961147affd47b914fef32fa07ebe21.tar.lz
nixpkgs-bc68c2985c961147affd47b914fef32fa07ebe21.tar.xz
nixpkgs-bc68c2985c961147affd47b914fef32fa07ebe21.tar.zst
nixpkgs-bc68c2985c961147affd47b914fef32fa07ebe21.zip
* Added a function waitForX, which returns when the X server accepts
  connections.
* In the root shell, source /etc/bashrc and set $HOME and $DISPLAY.  

svn path=/nixos/trunk/; revision=19247
Diffstat (limited to 'tests/trac.nix')
-rw-r--r--tests/trac.nix9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/trac.nix b/tests/trac.nix
index e5127a522a5..6bb3413cea9 100644
--- a/tests/trac.nix
+++ b/tests/trac.nix
@@ -65,11 +65,10 @@
       $webserver->mustSucceed("mkdir -p /var/trac/projects/test");
       $webserver->mustSucceed("PYTHONPATH=${pkgs.pythonPackages.psycopg2}/lib/python2.5/site-packages trac-admin /var/trac/projects/test initenv Test postgres://root\@postgresql/trac svn /repos/trac");
       
-      $client->waitForFile("/tmp/.X11-unix/X0");
-      sleep 20;
-      
-      $client->execute("su - root -c 'DISPLAY=:0.0 konqueror http://webserver/projects/test &'");
-      sleep 90;
+      $client->waitForX;
+      $client->execute("konqueror http://webserver/projects/test &");
+      $client->waitForWindow(qr/Test.*Konqueror/);
+      sleep 30; # loading takes a long time
       
       $client->screenshot("screen");
     '';