tests: improve robustness

Replace some blind timeouts with actual synchronization.
Improve performance on some slow tests.
Tweak some of the remaining timeouts.

This still isn't good enough to get 'make -j9 check'
working reliably on Cygwin for me; I think some Cygwin/
Windows scheduling issues remain.
This commit is contained in:
John Hood
2016-09-20 01:54:45 -04:00
parent e494025b24
commit 477729b315
11 changed files with 73 additions and 49 deletions
+13 -2
View File
@@ -17,6 +17,17 @@ if ($? == 0) {
} else {
$rc = ($? & 127) | 128;
}
print STDERR "%%% exitstatus: ${rc} %%%\n";
sleep 1;
print STDERR "@@@ exitstatus: ${rc} @@@\n";
# Now look for it in log file.
my $grepfilename = $ENV{'MOSH_E2E_TEST'} . ".tmux.log";
for my $i (1..600) {
open(my $grepfile, "<", $grepfilename) or die;
while (<$grepfile>) {
chomp;
/@@@ exitstatus: .* @@@/ && goto gotit;
}
close($grepfile);
sleep .1;
}
gotit:
exit $rc;