Check perms on home directory when running.
[buildfarm-client.git] / run_build.pl
index be324687d8f85aef9053ff429d376999b7173001..1e0e621cedf3625f747fba75396798f9f96b4b4c 100755 (executable)
@@ -313,7 +313,8 @@ foreach my $oldfile (glob("last*"))
 
 my $branch_root = getcwd();
 
-# make sure we are using GNU make
+# Normally we would require GNU Make, but allow farm
+# configuration to override this
 die "$make is not GNU Make - please fix config file"
   unless check_make();
 
@@ -563,7 +564,7 @@ elsif (!$from_source)
 
     # If config file changed, force a rebuild
     ($current_config) = (stat $orig_dir.'/'.$buildconf)[9];
-    if ($current_config > $last_config)
+    if (defined $current_config && $current_config > $last_config)
     {
       $last_status = 0;
       set_last('config',$current_config) unless $nostatus;
@@ -661,9 +662,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');
 
@@ -766,9 +767,9 @@ sub check_optional_step
         &&grep {$_ eq $wday} @{$oconf->{dow}});
 
     my $last_step = $last_status = find_last("$step") || 0;
-
-    return undef unless ($forcerun ||
-                         time >$last_step + (3600 * $oconf->{min_hours_since}));
+    ## If made it *to* these optional steps, we just run them and reset last time
+    #return undef unless ($forcerun ||
+    #                     time >$last_step + (3600 * $oconf->{min_hours_since}));
     set_last("$step") unless $nostatus;
 
     return 1;
@@ -827,6 +828,12 @@ sub display_features
     
 sub check_make
 {
+    # Allow farm member to configure non-GNU make
+    my $non_gnu_make = $EximBuild::conf{non_gnu_make};
+    if (!defined $non_gnu_make ||
+        (defined $non_gnu_make && $non_gnu_make == 1)) {
+      return 'OK';
+    }
     my @out = `$make -v 2>&1`;
     return undef unless ($? == 0 && grep {/GNU Make/} @out);
     return 'OK';
@@ -851,14 +858,14 @@ sub make
 
 sub make_doc
 {
-    return unless step_wanted('build_docs');
+    return unless step_wanted('make-doc');
     print time_str(),"running make doc ...\n" if $verbose;
 
     my (@makeout);
     @makeout = `cd $exim/doc/doc-docbook/ && \
                 EXIM_VER="4.82" $make everything 2>&1`;
     my $status = $? >>8;
-    writelog('build_docs',\@makeout);
+    writelog('make-doc',\@makeout);
     print "======== make doc log ===========\n",@makeout if ($verbose > 1);
     send_result('Doc',$status,\@makeout) if $status;
     $steps_completed .= " Doc";
@@ -996,7 +1003,7 @@ sub make_isolation_check
 
 sub make_test
 {
-    return unless step_wanted('make_test');
+    return unless step_wanted('test');
     print time_str(),"running make test ...\n" if $verbose;
     my $tests_range = $EximBuild::conf{range_num_tests} || "1 4";
     my @makeout;
@@ -1020,7 +1027,7 @@ sub make_test
         unshift @makeout, "Summary of failed tests:\n";
       }
     }
-    writelog('make_test',\@makeout);
+    writelog('test',\@makeout);
     print "======== make test logs ===========\n",@makeout
       if ($verbose > 1);