Quote parameter in template
[buildfarm-client.git] / run_build.pl
index 3ceb33114828ddb362b763eab384a77785d0bf05..bc15dd004a440bf798cb8e3702715c7647db3df8 100755 (executable)
@@ -505,9 +505,11 @@ $steps_completed = "";
 
 my @changed_files;
 my @changed_since_success;
+my $last_config;
 my $last_status;
 my $last_run_snap;
 my $last_success_snap;
+my $current_config;
 my $current_snap;
 my @filtered_files;
 my $savescmlog = "";
@@ -553,11 +555,20 @@ elsif (!$from_source)
     unlink "last.success";
 
     # get the timestamp data
+    $last_config = find_last('config') || 0;
     $last_status = find_last('status') || 0;
     $last_run_snap = find_last('run.snap');
     $last_success_snap = find_last('success.snap');
     $forcerun = 1 unless (defined($last_run_snap));
 
+    # If config file changed, force a rebuild
+    ($current_config) = (stat $orig_dir.'/'.$buildconf)[9];
+    if ($current_config > $last_config)
+    {
+      $last_status = 0;
+      set_last('config',$current_config) unless $nostatus;
+    }
+
     # updated by find_changed to last mtime of any file in the repo
     $current_snap=0;
 
@@ -650,9 +661,9 @@ make();
 
 display_features();
 
-make_test() if (check_optional_step('make_test'));
+make_test() if (check_optional_step('test'));
 
-make_doc() if (check_optional_step('build_docs'));
+make_doc() if (check_optional_step('make-doc'));
 
 ##check_port_is_ok($buildport,'Post');
 
@@ -999,6 +1010,15 @@ sub make_test
                   ./runtest \$WORKDIR/$exim/src/build-*/exim -CONTINUE $tests_range )2>&1`;
       $status = $? >>8;
       push @makeout, @tmp;
+      # Prepend the failed summary log outputs for ease of reading
+      my $fail_summary = "$exim/test/failed-summary.log";
+      if (-f $fail_summary)
+      {
+        @tmp = `cat $fail_summary`;
+        push @tmp, "\n";
+        unshift @makeout, @tmp;
+        unshift @makeout, "Summary of failed tests:\n";
+      }
     }
     writelog('test',\@makeout);
     print "======== make test logs ===========\n",@makeout
@@ -1138,6 +1158,9 @@ sub configure
                           @tmp;
         push @config_opts, grep s/^(?:EXIM_)(PERL|PYTHON)=.*/$1/,
                            @tmp;
+        # OpenSSL doesn't have a specific USE flag
+        push @config_opts, grep s/^(TLS_LIBS.*-l(ssl|crypto)).*/OPENSSL/,
+                           @tmp;
         $EximBuild::conf{config_opts} = \@config_opts;
         
         # Does not matter what the Exim version is, as long as it is valid.