Bug 300409 - Add tinderbox client support for "configure-only" state and for download-and-repackage-locales mode, r=Chase

This commit is contained in:
bsmedberg%covad.net 2005-08-01 14:14:38 +00:00
Родитель 3c5d071f7e
Коммит 8b5f33daae
3 изменённых файлов: 54 добавлений и 33 удалений

Просмотреть файл

@ -24,7 +24,7 @@ use Config; # for $Config{sig_name} and $Config{sig_num}
use File::Find ();
use File::Copy;
$::UtilsVersion = '$Revision: 1.298 $ ';
$::UtilsVersion = '$Revision: 1.299 $ ';
package TinderUtils;
@ -113,6 +113,7 @@ sub ParseArgs {
$args->{ReportStatus} = 0, next if $arg eq '--noreport';
$args->{ReportFinalStatus} = 0, next if $arg eq '--nofinalreport';
$args->{RunMozillaTests} = 0, next if $arg eq '--notest';
$args->{ConfigureOnly} = 1, next if $arg eq '--configureonly';
$args->{TestOnly} = 1, next if $arg eq '--testonly';
$args->{BuildOnce} = 1, next if $arg eq '--once';
$args->{UseTimeStamp} = 0, next if $arg eq '--notimestamp';
@ -976,10 +977,15 @@ sub BuildIt {
# Run the build target.
if ($build_status ne 'busted') {
$status = run_shell_command "$make $TreeSpecific::build_target";
my $buildTarget = $TreeSpecific::build_target;
if ($Settings::ConfigureOnly) {
$buildTarget = "configure";
}
$status = run_shell_command "$make $buildTarget";
if ($status != 0) {
$build_status = 'busted';
} elsif (not BinaryExists($full_binary_name)) {
} elsif (!$Settings::ConfigureOnly && !BinaryExists($full_binary_name)) {
print_log "Error: binary not found: $binary_basename\n";
$build_status = 'busted';
} else {

Просмотреть файл

@ -149,7 +149,7 @@ sub mail_locale_finished_message {
open(OUT,">$logfile.new") || die ("$logfile.new: $!\n");
while (<IN>) {
s/\r\n$/\n/;
print OUT "$_";
print OUT "$_";
}
close(IN);
close(OUT);
@ -274,7 +274,7 @@ sub packit {
# directory.
my @msi = grep { -f $_ } <${package_location}/*.msi>;
if ( scalar(@msi) gt 0 ) {
my $msi_files = join(' ', @msi);
my $msi_files = join(' ', @msi);
TinderUtils::run_shell_command "cp $msi_files $stagedir/";
}
@ -337,15 +337,15 @@ sub packit {
my @dmg;
@dmg = grep { -f $_ } <${package_location}/../*.dmg.gz>;
if ( scalar(@dmg) eq 0 ) {
@dmg = grep { -f $_ } <${package_location}/../*.dmg>;
@dmg = grep { -f $_ } <${package_location}/../*.dmg>;
}
if ( scalar(@dmg) gt 0 ) {
my $dmg_files = join(' ', @dmg);
TinderUtils::print_log "Copying $dmg_files to $stagedir/\n";
TinderUtils::run_shell_command "cp $dmg_files $stagedir/";
my $dmg_files = join(' ', @dmg);
TinderUtils::print_log "Copying $dmg_files to $stagedir/\n";
TinderUtils::run_shell_command "cp $dmg_files $stagedir/";
} else {
TinderUtils::print_log "No files to copy\n";
TinderUtils::print_log "No files to copy\n";
}
if ( scalar(@xforms_xpi) gt 0 ) {
@ -462,6 +462,15 @@ sub packit_l10n {
TinderUtils::print_log "Starting l10n builds\n";
foreach my $wgeturl (keys(%Settings::WGetFiles)) {
my $status = TinderUtils::run_shell_command_with_timeout("wget --non-verbose --output-document \"$Settings::WGetFiles{$wgeturl}\" $wgeturl",
$Settings::WGetTimeout);
if ($status->{exit_value} != 0) {
TinderUtils::print_log "Error: wget failed or timed out.\n";
return (("busted"));
}
}
unless (open(ALL_LOCALES, "<$srcdir/$Settings::LocaleProduct/locales/all-locales")) {
TinderUtils::print_log "Error: Couldn't read $srcdir/$Settings::LocaleProduct/locales/all-locales.\n";
return (("testfailed"));
@ -506,24 +515,20 @@ sub packit_l10n {
$save_path = $ENV{PATH};
$ENV{PATH} = $Settings::as_perl_path.":".$ENV{PATH};
}
# the one operation we care about saving status of
if ($Settings::sea_installer || $Settings::stub_installer) {
$status = run_locale_shell_command "$Settings::Make -C $objdir/$Settings::LocaleProduct/locales installers-$locale";
if ($status != 0) {
$tinderstatus = 'busted';
}
} else {
$status = 0;
$status = run_locale_shell_command "$Settings::Make -C $objdir/$Settings::LocaleProduct/locales installers-$locale $Settings::BuildLocalesArgs";
if ($status != 0) {
$tinderstatus = 'busted';
}
if ($tinderstatus eq 'success') {
if (is_windows()) {
run_locale_shell_command "mkdir -p $stagedir/windows-xpi/";
run_locale_shell_command "cp $package_location/*$locale.langpack.xpi $stagedir/windows-xpi/$locale.xpi";
} elsif (is_mac()) {
# Instead of adding something here (which will never be called),
# please add your code to the is_mac() section below.
} elsif (is_mac()) {
# Instead of adding something here (which will never be called),
# please add your code to the is_mac() section below.
} elsif (is_linux()) {
run_locale_shell_command "mkdir -p $stagedir/linux-xpi/";
run_locale_shell_command "cp $package_location/*$locale.langpack.xpi $stagedir/linux-xpi/$locale.xpi";
@ -578,7 +583,7 @@ sub packit_l10n {
TinderUtils::print_log "Copying $dmg_files to $stagedir/\n";
TinderUtils::run_shell_command "cp $dmg_files $stagedir/";
} else {
TinderUtils::print_log "No files to copy\n";
TinderUtils::print_log "No files to copy\n";
}
if ($tinderstatus eq 'success') {
@ -747,19 +752,19 @@ sub PreBuild {
my ($c_hour,$c_yday) = (localtime(time))[2,7];
if ( -e "last-built") {
($last_build_day) = (localtime((stat "last-built")[9]))[7];
($last_build_day) = (localtime((stat "last-built")[9]))[7];
} else {
$last_build_day = -1;
$last_build_day = -1;
}
if (cacheit($c_hour,$c_yday,$Settings::build_hour,$last_build_day)) {
TinderUtils::print_log "starting nightly release build\n";
# clobber the tree
TinderUtils::run_shell_command "rm -rf mozilla";
$cachebuild = 1;
TinderUtils::print_log "starting nightly release build\n";
# clobber the tree
TinderUtils::run_shell_command "rm -rf mozilla";
$cachebuild = 1;
} else {
TinderUtils::print_log "starting non-release build\n";
$cachebuild = 0;
TinderUtils::print_log "starting non-release build\n";
$cachebuild = 0;
}
}
@ -850,8 +855,10 @@ sub main {
$upload_directory = $package_location . "/" . $upload_directory;
unless (packit($package_creation_path,$package_location,$url_path,$upload_directory,$objdir,$cachebuild)) {
return returnStatus("Packaging failed", ("testfailed"));
if (!$Settings::ConfigureOnly) {
unless (packit($package_creation_path,$package_location,$url_path,$upload_directory,$objdir,$cachebuild)) {
return returnStatus("Packaging failed", ("testfailed"));
}
}
if ($Settings::BuildLocales) {
@ -859,7 +866,7 @@ sub main {
}
unless (pushit($Settings::ssh_server,
$ftp_path,$upload_directory, $cachebuild)) {
$ftp_path,$upload_directory, $cachebuild)) {
return returnStatus("Pushing package $upload_directory failed", ("testfailed"));
}

Просмотреть файл

@ -30,11 +30,19 @@ $ReportStatus = 1; # Send results to server, or not
$ReportFinalStatus = 1; # Finer control over $ReportStatus.
$UseTimeStamp = 1; # Use the CVS 'pull-by-timestamp' option, or not
$BuildOnce = 0; # Build once, don't send results to server
$ConfigureOnly = 0; # Configure, but do not build.
$TestOnly = 0; # Only run tests, don't pull/build
$BuildEmbed = 0; # After building seamonkey, go build embed app.
$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
$BuildLocales = 0; # Do l10n packaging?
# Only used when $BuildLocales = 1
%WGetFiles = (); # Pull files from the web, URL => Location
$WGetTimeout = 360; # Wget timeout, in seconds
$BuildLocalesArgs = ""; # Extra attributes to add to the makefile command
# which builds the "installers-<locale>" target.
# Typically used to set ZIP_IN and WIN32_INSTALLER_IN
# Tests
$CleanProfile = 0;
$ResetHomeDirForTests = 1;