From 5730c27aedb5ecf957a6125b130a43107a68b61d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 4 Jan 2010 16:30:54 +0000 Subject: [PATCH] * For debugging, if $tests is not set, read commands from stdin. svn path=/nixos/trunk/; revision=19210 --- lib/test-driver/test-driver.pl | 11 +++++++++-- tests/kde4.nix | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/test-driver/test-driver.pl b/lib/test-driver/test-driver.pl index 88bce47b23f..10efcbb690c 100644 --- a/lib/test-driver/test-driver.pl +++ b/lib/test-driver/test-driver.pl @@ -20,8 +20,15 @@ sub startAll { sub runTests { - eval "$context $ENV{tests}"; - die $@ if $@; + if (defined $ENV{tests}) { + eval "$context $ENV{tests}"; + die $@ if $@; + } else { + while () { + eval "$context $_\n"; + warn $@ if $@; + } + } # Copy the kernel coverage data for each machine, if the kernel # has been compiled with coverage instrumentation. diff --git a/tests/kde4.nix b/tests/kde4.nix index 3dc5e35a1c5..33ef1e006fd 100644 --- a/tests/kde4.nix +++ b/tests/kde4.nix @@ -62,7 +62,7 @@ rec { sleep 10; - print STDERR $client->execute("DISPLAY=:0.0 scrot /hostfs/$ENV{out}/screen.png"); + print STDERR $client->mustSucceed("DISPLAY=:0.0 scrot /hostfs/$ENV{out}/screen.png"); ''; }