summaryrefslogtreecommitdiff
path: root/solenv/bin
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2011-09-23 03:39:41 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2011-09-23 03:40:03 -0500
commit09789b58d70cb9a7c9d33c5bf3a1255ce96124b6 (patch)
treefef30213a0075159232734298675581705ae0f13 /solenv/bin
parent2536f92c61069531a179624ff2d70603995127e6 (diff)
add a retry loop in build.pl on Error 126 on Windows.
Diffstat (limited to 'solenv/bin')
-rwxr-xr-xsolenv/bin/build.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl
index 93a695257879..d402092b875c 100755
--- a/solenv/bin/build.pl
+++ b/solenv/bin/build.pl
@@ -1808,6 +1808,8 @@ sub run_job {
my ($job, $path, $registered_name) = @_;
my $job_to_do = $job;
my $error_code = 0;
+ my $retry_counter = 10;
+
print "$registered_name\n";
return 0 if ( $show );
$job_to_do = $deliver_command if ($job eq 'deliver');
@@ -1830,6 +1832,7 @@ sub run_job {
system("$perl $mkout");
};
}
+RETRY:
open (MAKE, "$job_to_do 2>&1 |") or return 8;
open (LOGFILE, "> $log_file") or return 8;
while (<MAKE>) { print LOGFILE $_; print $_ }
@@ -1838,6 +1841,11 @@ sub run_job {
close LOGFILE;
if ( $error_code != 0)
{
+ if ($ENV{GUI} eq 'WIN' && $retry_counter > 0)
+ {
+ $retry_counter -= 1;
+ system('grep "Error 126\$"') && goto RETRY;
+ }
system("echo \"log for $path\" >> $build_error_log");
system("cat $log_file >> $build_error_log");
}