From 5078152292b1fa4ad019b22702fffa93797ad1f2 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Thu, 27 Nov 2014 10:48:27 -0500 Subject: [PATCH] Tests: Fix sigstop on parallel tests --- test_regress/driver.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test_regress/driver.pl b/test_regress/driver.pl index af6cb9854..d13e33bde 100755 --- a/test_regress/driver.pl +++ b/test_regress/driver.pl @@ -115,9 +115,15 @@ if ($#opt_tests<0) { foreach my $dir (@Test_Dirs) { my @stats = stat($dir); # Uniquify by inode, so different paths to same place get combined next if !$stats[1] || $uniq{$stats[1]}++; - push @opt_tests, glob ("${dir}/t_*.pl"); + push @opt_tests, sort(glob ("${dir}/t_*.pl")); } } +if ($#opt_tests>=2 && $opt_jobs>=2) { + # Without this tests such as t_debug_sigsegv_bt_bad.pl will occasionally + # block on input and cause a SIGSTOP, then a "fg" was needed to resume testing. + print STDERR "== Many jobs; redirecting STDIN\n"; + open(STDIN, "+>/dev/null"); +} mkdir "obj_dir";