зеркало из https://github.com/mozilla/pjs.git
capability to have tinderbox reboot after each build cycle (basically for win9x machines)
This commit is contained in:
Родитель
ccb5e1e44b
Коммит
640f5485cc
|
@ -23,7 +23,7 @@ use Config; # for $Config{sig_name} and $Config{sig_num}
|
|||
use File::Find ();
|
||||
|
||||
|
||||
$::UtilsVersion = '$Revision: 1.162 $ ';
|
||||
$::UtilsVersion = '$Revision: 1.163 $ ';
|
||||
|
||||
package TinderUtils;
|
||||
|
||||
|
@ -801,18 +801,39 @@ sub BuildIt {
|
|||
$build_failure_count = 0;
|
||||
}
|
||||
|
||||
# win98 just ain't up to the task of continuous builds
|
||||
print_log "System going down for a reboot!! " . scalar localtime() . "\n"
|
||||
if $Settings::OS eq 'WIN98' && $Settings::RebootSystem;
|
||||
|
||||
close LOG;
|
||||
chdir $build_dir;
|
||||
|
||||
mail_build_finished_message($start_time, $build_status, $logfile)
|
||||
if $Settings::ReportStatus;
|
||||
|
||||
rebootSystem() if $Settings::OS eq 'WIN98' && $Settings::RebootSystem;
|
||||
|
||||
$exit_early++ if $Settings::TestOnly and $build_status ne 'success';
|
||||
$exit_early++ if $Settings::BuildOnce;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sub rebootSystem {
|
||||
# assumption is that system has been configured to automatically
|
||||
# startup tinderbox again on the other side of the reboot
|
||||
if ($Settings::OS eq 'WIN98') {
|
||||
# http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q234216
|
||||
# 6 == RESTART | FORCE; applies to win98 and winME
|
||||
print "System going down for a reboot!! ", scalar localtime, "\n";
|
||||
system("rundll32.exe shell32.dll,SHExitWindowsEx 6") == 0 ||
|
||||
warn "Failed to $! $@ $?";
|
||||
} else {
|
||||
print "rebootSystem() called on non-Win9x system. wtf?\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Create a profile named $Settings::MozProfileName in the normal $build_dir place.
|
||||
sub create_profile {
|
||||
my ($build_dir, $binary_dir, $binary) = @_;
|
||||
|
@ -851,18 +872,18 @@ sub find_pref_file {
|
|||
}
|
||||
|
||||
unless (-e $profile_dir) {
|
||||
print_log "ERROR: profile $profile_dir does not exist\n";
|
||||
#XXX should make 'run_all_tests' throw a 'testfailed' exception
|
||||
# and just skip all the continual checking for $test_result
|
||||
return; # empty list
|
||||
print_log "ERROR: profile $profile_dir does not exist\n";
|
||||
#XXX should make 'run_all_tests' throw a 'testfailed' exception
|
||||
# and just skip all the continual checking for $test_result
|
||||
return; # empty list
|
||||
}
|
||||
|
||||
my $found = undef;
|
||||
my $sub = sub {$pref_file = $File::Find::name, $found++ if $pref_file eq $_};
|
||||
File::Find::find($sub, $profile_dir);
|
||||
unless ($found) {
|
||||
print_log "ERROR: couldn't find prefs.js in $profile_dir\n";
|
||||
return; # empty list
|
||||
print_log "ERROR: couldn't find prefs.js in $profile_dir\n";
|
||||
return; # empty list
|
||||
}
|
||||
|
||||
# Find full profile_dir while we're at it.
|
||||
|
|
|
@ -114,3 +114,16 @@ $ConfigureEnvArgs = '';
|
|||
$Compiler = 'gcc';
|
||||
$NSPRArgs = '';
|
||||
$ShellOverride = '';
|
||||
|
||||
# allow override of timezone value (for win32 POSIX::strftime)
|
||||
$Timezone = '';
|
||||
|
||||
# Reboot the OS at the end of build-and-test cycle. This is primarily
|
||||
# intended for Win9x, which can't last more than a few cycles before
|
||||
# locking up (and testing would be suspect even after a couple of cycles).
|
||||
# Right now, there is only code to force the reboot for Win9x, so even
|
||||
# setting this to 1, will not have an effect on other platforms. Setting
|
||||
# up win9x to automatically logon and begin running tinderbox is left
|
||||
# as an exercise to the reader.
|
||||
$RebootSystem = 0;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче