From: Maik Fischer Date: Sun, 27 Nov 2011 16:03:52 +0000 (+0100) Subject: complete-run: die if X11::XCB couldn’t connect to a display X-Git-Tag: 4.2~200 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6a5ca32c5a6bbdd5fb177c814f5c2d1c748458e7;p=i3%2Fi3 complete-run: die if X11::XCB couldn’t connect to a display --- diff --git a/testcases/complete-run.pl b/testcases/complete-run.pl index 1b05235e..6a8f69b9 100755 --- a/testcases/complete-run.pl +++ b/testcases/complete-run.pl @@ -84,20 +84,16 @@ if (@displays == 0) { # the X server from exiting (Xdummy will restart it, but not quick enough # sometimes) my @conns; -my @wdisplays; for my $display (@displays) { my $screen; my $x = X11::XCB->new($display, $screen); if ($x->has_error) { - Log "WARNING: Not using X11 display $display, could not connect"; + die "Could not connect to display $display\n"; } else { push @conns, $x; - push @wdisplays, $display; } } -die "No usable displays found" if @wdisplays == 0; - # 1: get a list of all testcases my @testfiles = @ARGV; @@ -125,11 +121,11 @@ my $harness = TAP::Harness->new({ }); my $aggregator = TAP::Parser::Aggregator->new(); $aggregator->start(); -status_init(displays => \@wdisplays, tests => $num); +status_init(displays => \@displays, tests => $num); # We start tests concurrently: For each display, one test gets started. Every # test starts another test after completing. -for (@wdisplays) { $cv->begin; take_job($_) } +for (@displays) { $cv->begin; take_job($_) } # # Takes a test from the beginning of @testfiles and runs it.