* Make the Quake 3 test less timing-sensitive.
svn path=/nixos/trunk/; revision=19816
This commit is contained in:
parent
0f56bd755a
commit
5b60c280d7
|
@ -216,6 +216,15 @@ sub mustSucceed {
|
|||
}
|
||||
|
||||
|
||||
sub waitUntilSucceeds {
|
||||
my ($self, $command) = @_;
|
||||
retry sub {
|
||||
my ($status, $out) = $self->execute($command);
|
||||
return 1 if $status == 0;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
sub mustFail {
|
||||
my ($self, $command) = @_;
|
||||
my ($status, $out) = $self->execute($command);
|
||||
|
|
|
@ -39,10 +39,10 @@ rec {
|
|||
$client1->execute("quake3 '+set r_fullscreen 0' '+set name Foo' '+connect server' &");
|
||||
$client2->execute("quake3 '+set r_fullscreen 0' '+set name Bar' '+connect server' &");
|
||||
|
||||
sleep 40;
|
||||
$server->waitUntilSucceeds("grep -q 'Foo.*entered the game' /tmp/log");
|
||||
$server->waitUntilSucceeds("grep -q 'Bar.*entered the game' /tmp/log");
|
||||
|
||||
$server->mustSucceed("grep -q 'Foo.*entered the game' /tmp/log");
|
||||
$server->mustSucceed("grep -q 'Bar.*entered the game' /tmp/log");
|
||||
sleep 30; # wait for a while to get a nice screenshot
|
||||
|
||||
$client1->screenshot("screen1");
|
||||
$client2->screenshot("screen2");
|
||||
|
|
Loading…
Reference in New Issue