зеркало из https://github.com/mozilla/gecko-dev.git
Bug 336463: Add ability to run a clobber build if requested from a CVS checkin; r=rhelmer. This isn't *quite* finished; we'll need to make sure that all tinderboxen have the right --config-cvsup-dir flag in the multi-configs.pl.
This commit is contained in:
Родитель
28a9274e25
Коммит
3cd776575a
|
@ -24,7 +24,7 @@ use Config; # for $Config{sig_name} and $Config{sig_num}
|
|||
use File::Find ();
|
||||
use File::Copy;
|
||||
|
||||
$::UtilsVersion = '$Revision: 1.335 $ ';
|
||||
$::UtilsVersion = '$Revision: 1.336 $ ';
|
||||
|
||||
package TinderUtils;
|
||||
|
||||
|
@ -53,9 +53,16 @@ require "gettime.pl";
|
|||
# cpan> install Bundle::LWP
|
||||
#
|
||||
|
||||
##
|
||||
## Constants.
|
||||
##
|
||||
|
||||
my $co_time_str = 0; # Global, let tests send cvs co time to graph server.
|
||||
my $co_default_timeout = 300;
|
||||
my $graph_time;
|
||||
my $server_start_time;
|
||||
my $CVS_CLOBBER_FILE = 'CLOBBER';
|
||||
my $ST_MTIME = 9;
|
||||
|
||||
sub Setup {
|
||||
InitVars();
|
||||
|
@ -83,11 +90,32 @@ sub UpdateBuildConfigs() {
|
|||
chdir($args->{'TboxBuildConfigDir'}) or
|
||||
die "Couldn't chdir() into $args->{'TboxBuildConfigDir'}: $!";
|
||||
|
||||
my $origClobberFileMTime = 0;
|
||||
if (-f $CVS_CLOBBER_FILE) {
|
||||
$origClobberFileMTime = (stat($CVS_CLOBBER_FILE))[$ST_MTIME];
|
||||
} else {
|
||||
print STDERR "Error: Couldn't find $CVS_CLOBBER_FILE in " .
|
||||
"$args->{'TboxBuildConfigDir'}\n";
|
||||
}
|
||||
|
||||
my $status = run_shell_command_with_timeout('cvs update -CPd',
|
||||
$co_default_timeout);
|
||||
if ($status->{'exit_value'} != 0) {
|
||||
die "cvs update in $args->{'TboxBuildConfigDir'} failed";
|
||||
die "cvs update in $args->{'TboxBuildConfigDir'} failed\n";
|
||||
}
|
||||
|
||||
if (-f $CVS_CLOBBER_FILE) {
|
||||
my $newClobberFileMTime = (stat($CVS_CLOBBER_FILE))[$ST_MTIME];
|
||||
|
||||
# Check to make sure that the stat() call actually returned
|
||||
# something; if so, is the new modified-time greater than the old
|
||||
# modified-time? If so, CVS probably updated it.
|
||||
if (defined($newClobberFileMTime) &&
|
||||
$newClobberFileMTime > $origClobberFileMTime) {
|
||||
$args->{'ForceRebuild'} = 1;
|
||||
}
|
||||
}
|
||||
|
||||
chdir($cwd) or die "Couldn't return to $cwd";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1069,6 +1069,17 @@ sub PreBuild {
|
|||
unlink "last-built.new";
|
||||
}
|
||||
|
||||
if ($Settings::ForceRebuild) {
|
||||
TinderUtils::print_log("Force rebuild requested; removing last-built\n");
|
||||
if (-e 'last-built') {
|
||||
unlink 'last-built';
|
||||
TinderUtils::print_log("Removal of last-built failed?\n")
|
||||
if (-e 'last-built');
|
||||
} else {
|
||||
TinderUtils::print_log("Force rebuild requested, but last-built not found.\n");
|
||||
}
|
||||
}
|
||||
|
||||
# We want to be able to remove the last-built file at any time of
|
||||
# day to trigger a respin, even if it's before the designated build
|
||||
# hour. This means that we want to do a cached build if any of the
|
||||
|
|
|
@ -36,6 +36,8 @@ $BuildEmbed = 0; # After building seamonkey, go build embed app.
|
|||
$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
|
||||
$SkipCheckout = 0; # Use to debug build process without checking out new source.
|
||||
$BuildLocales = 0; # Do l10n packaging?
|
||||
$ForceRebuild = 0; # Do a full re-build even when in depend mode; used
|
||||
# internally; you probably shouldn't set this
|
||||
|
||||
# Only used when $BuildLocales = 1
|
||||
%WGetFiles = (); # Pull files from the web, URL => Location
|
||||
|
|
Загрузка…
Ссылка в новой задаче