$only_steps ||= "";
if ($only_steps =~ /\S/)
{
- %only_steps = map {$_ => 1} split(/\s+/,$only_steps);
+ %only_steps = map {$_ => 1} split(/(\s+|[:,])/,$only_steps);
}
# Currently only specifying a branch is actually used.
$force_every = $force_every->{$branch} || $force_every->{default};
}
-my $config_opts = $EximBuild::conf{config_opts};
my $scm = new EximBuild::SCM \%EximBuild::conf;
my $buildport;
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 = "";
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;
--test = short for --nosend --nostatus --verbose --force
--skip-steps=list = skip certain steps
--only-steps=list = only do certain steps, not allowed with skip-steps
+ lists can be comma, colon, or space separated
Default branch is HEAD. Usually only the --config option should be necessary.
sub make_doc
{
- return unless step_wanted('make-doc');
+ return unless step_wanted('build_docs');
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('make-doc',\@makeout);
+ writelog('build_docs',\@makeout);
print "======== make doc log ===========\n",@makeout if ($verbose > 1);
send_result('Doc',$status,\@makeout) if $status;
$steps_completed .= " Doc";
sub make_test
{
- return unless step_wanted('test');
+ return unless step_wanted('make_test');
print time_str(),"running make test ...\n" if $verbose;
my $tests_range = $EximBuild::conf{range_num_tests} || "1 4";
my @makeout;
./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);
+ writelog('make_test',\@makeout);
print "======== make test logs ===========\n",@makeout
if ($verbose > 1);
sub configure
{
-
- my @quoted_opts;
- foreach my $c_opt (@$config_opts)
- {
- if ($c_opt =~ /['"]/)
- {
- push(@quoted_opts,$c_opt);
- }
- else
- {
- push(@quoted_opts,"'$c_opt'");
- }
- }
+ return unless step_wanted('configure');
+ print time_str(),"creating configuration ...\n" if $verbose;
my $env = $EximBuild::conf{makefile_set};
my $add = $EximBuild::conf{makefile_add};
echo "Contents of Local/Makefile:"
egrep '^[^#]' $local_conf `;
push @confout, @tmp;
+ # Build the config_opts array to send to the server
+ chomp @tmp;
+ my @config_opts = grep s/(?:LOOKUP_|EXPERIMENTAL_|USE_)(\S+)=.*/$1/,
+ @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.
my $exim_ver = $EximBuild::conf{exim_test_version} || '4.82';
`cd $exim