From 970b40d45bf4c7006c1478505e7b7dfd35d9aa41 Mon Sep 17 00:00:00 2001 From: "seawood%netscape.com" Date: Sun, 20 Oct 2002 07:28:24 +0000 Subject: [PATCH] This patch does the following: - converts all commands to an arguments array for passing to exec() - Runs "dos2unix" on the log file before mailing it off, if on Windows - Adds a "ProductName" config option to control where to look for the profile on Windows. - Fixes clobbering of the profile on Windows. - Makes the script look for the HiRes time module instead of the Win32API module for cygwin perl. Thanks to Brian Ryner for the patch. Bug #115690 r=cls git-svn-id: svn://10.0.0.236/trunk@132304 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/tools/performance/startup/gettime.pl | 2 +- mozilla/tools/tinderbox/build-chimera.pl | 10 +- mozilla/tools/tinderbox/build-galeon.pl | 9 +- .../tools/tinderbox/build-seamonkey-util.pl | 263 +++++++++--------- mozilla/tools/tinderbox/gettime.pl | 2 +- mozilla/tools/tinderbox/tinder-defaults.pl | 1 + 6 files changed, 143 insertions(+), 144 deletions(-) diff --git a/mozilla/tools/performance/startup/gettime.pl b/mozilla/tools/performance/startup/gettime.pl index 4c40c02a8b7..8d6ab65b1ae 100644 --- a/mozilla/tools/performance/startup/gettime.pl +++ b/mozilla/tools/performance/startup/gettime.pl @@ -30,7 +30,7 @@ sub getTime () { return &$timesub if $^O eq "MacOS"; # don't know a better way on Mac - if ($^O eq "MSWin32" || $^O eq "cygwin") { #XXX not tested on cygwin + if ($^O eq "MSWin32") { eval "use Win32::API;"; $timesub = sub { # pass pointer to struct, void return diff --git a/mozilla/tools/tinderbox/build-chimera.pl b/mozilla/tools/tinderbox/build-chimera.pl index 7667fc276d0..0acc17efcdf 100644 --- a/mozilla/tools/tinderbox/build-chimera.pl +++ b/mozilla/tools/tinderbox/build-chimera.pl @@ -371,8 +371,7 @@ sub main { $post_status = TinderUtils::AliveTest("ChimeraAliveTest", "$chimera_dir/build/Navigator.app/Contents/MacOS", - "Navigator", - "-url \"about:blank\"", + ["Navigator", "-url", "about:blank"], 45); } @@ -431,8 +430,7 @@ sub main { } else { $post_status = TinderUtils::AliveTest("ChimeraLayoutTest8Test", "$chimera_dir/build/Navigator.app/Contents/MacOS", - "Navigator", - "-url \"http://lxr.mozilla.org/seamonkey/source/webshell/tests/viewer/samples/test8.html\"", + ["Navigator", "-url", "http://lxr.mozilla.org/seamonkey/source/webshell/tests/viewer/samples/test8.html"], 20); } } @@ -442,16 +440,14 @@ sub main { $post_status = TinderUtils::LayoutPerformanceTest("ChimeraLayoutPerformanceTest", - "Navigator", "$chimera_dir/build/Navigator.app/Contents/MacOS", - "-url"); + ["Navigator", "-url"]); } # Startup test. if ($chimera_startup_test and $post_status eq 'success') { - $post_status = TinderUtils::StartupPerformanceTest("ChimeraStartupPerformanceTest", "Navigator", diff --git a/mozilla/tools/tinderbox/build-galeon.pl b/mozilla/tools/tinderbox/build-galeon.pl index 4ac16eb1757..699c1d94bb8 100644 --- a/mozilla/tools/tinderbox/build-galeon.pl +++ b/mozilla/tools/tinderbox/build-galeon.pl @@ -119,8 +119,7 @@ sub main { if ($galeon_alive_test and $post_status eq 'success') { $post_status = TinderUtils::AliveTest("GaleonAliveTest", "$galeon_dir/src", - "galeon", - "about:blank", + ["galeon", "about:blank"], 45); } @@ -128,8 +127,7 @@ sub main { if ($galeon_test8_test and $post_status eq 'success') { $post_status = TinderUtils::AliveTest("GaleonTest8Test", "$galeon_dir/src", - "galeon", - "resource:///res/samples/test8.html", + ["galeon", "resource:///res/samples/test8.html"], 45); } @@ -138,8 +136,7 @@ sub main { TinderUtils::StartupPerformanceTest("GaleonStartupPerformanceTest", "galeon", "$galeon_dir/src", - "", - "$galeon_dir/src/../../../startup-test.html"); + ["", "$galeon_dir/src/../../../startup-test.html"]); } diff --git a/mozilla/tools/tinderbox/build-seamonkey-util.pl b/mozilla/tools/tinderbox/build-seamonkey-util.pl index 6c177debaed..756905b6876 100644 --- a/mozilla/tools/tinderbox/build-seamonkey-util.pl +++ b/mozilla/tools/tinderbox/build-seamonkey-util.pl @@ -22,7 +22,7 @@ use File::Path; # for rmtree(); use Config; # for $Config{sig_name} and $Config{sig_num} use File::Find (); -$::UtilsVersion = '$Revision: 1.183 $ '; +$::UtilsVersion = '$Revision: 1.184 $ '; package TinderUtils; @@ -584,6 +584,12 @@ sub mail_build_finished_message { close LOG; unlink($logfile); + # If on Windows, make sure the log mail has unix lineendings, or + # we'll confuse the log scraper. + if ($platform eq 'windows') { + system("dos2unix $logfile.last"); + } + if ($Settings::ReportStatus and $Settings::ReportFinalStatus) { if ($Settings::blat ne "" && $Settings::use_blat) { system("$Settings::blat $logfile.last -t $Settings::Tinderbox_server"); @@ -862,24 +868,14 @@ sub rebootSystem { sub create_profile { my ($build_dir, $binary_dir, $binary) = @_; my $result = run_cmd($build_dir, $binary_dir, - $binary . " -CreateProfile $Settings::MozProfileName", + [$binary, "-CreateProfile", $Settings::MozProfileName], "/dev/null", $Settings::CreateProfileTimeout); return $result; } - -sub find_pref_file { +sub get_profile_dir { my $build_dir = shift; - - # profile $Settings::MozProfileName must exist before calling this sub - - # default to *nix - my $pref_file = "prefs.js"; - my $profile_dir = "$build_dir/.mozilla"; - $profile_dir ="/boot/home/config/settings/Mozilla/$Settings::MozProfileName" if ($Settings::OS eq "BeOS"); - - # win32: works on win98 and win2k (file bugs on jrgm@netscape.com if it - # doesn't work on Me, XP, NT4 ...) + my $profile_dir; if ($Settings::OS =~ /^WIN/) { if ($Settings::OS =~ /^WIN9/) { # 98 [but what does uname say on Me?] $profile_dir = $ENV{winbootdir} || $ENV{windir} || "C:\\WINDOWS"; @@ -892,10 +888,26 @@ sub find_pref_file { $profile_dir = $ENV{APPDATA} || "C:\\_UNKNOWN_"; } } - $profile_dir .= "\\Mozilla\\Profiles\\$Settings::MozProfileName"; + $profile_dir .= "\\$Settings::ProductName\\Profiles\\$Settings::MozProfileName"; $profile_dir =~ s|\\|/|g; + } elsif ($Settings::OS eq "BeOS") { + $profile_dir = "/boot/home/config/settings/Mozilla/$Settings::MozProfileName"; + } else { + # *nix + $profile_dir = "$build_dir/.mozilla/$Settings::MozProfileName"; } + return $profile_dir; +} + +sub find_pref_file { + my $build_dir = shift; + + # profile $Settings::MozProfileName must exist before calling this sub + + # default to *nix + my $pref_file = "prefs.js"; + my $profile_dir = get_profile_dir($build_dir); unless (-e $profile_dir) { print_log "ERROR: profile $profile_dir does not exist\n"; #XXX should make 'run_all_tests' throw a 'testfailed' exception @@ -1107,7 +1119,7 @@ BEGIN { sub fork_and_log { # Fork a sub process and log the output. - my ($home, $dir, $cmd, $logfile) = @_; + my ($home, $dir, $args, $logfile) = @_; my $pid = fork; # Fork off a child process. @@ -1128,7 +1140,7 @@ sub fork_and_log { open STDERR, ">&STDOUT"; select STDOUT; $| = 1; # make STDOUT unbuffered select STDERR; $| = 1; # make STDERR unbuffered - exec $cmd; + exec @$args; die "Could not exec()"; } return $pid; @@ -1200,13 +1212,13 @@ sub wait_for_pid { # shared cltbld user account. # sub run_cmd { - my ($home_dir, $binary_dir, $cmd, $logfile, $timeout_secs) = @_; + my ($home_dir, $binary_dir, $args, $logfile, $timeout_secs) = @_; my $now = localtime(); print_log "Begin: $now\n"; - print_log "cmd = $cmd\n"; + print_log "cmd = @$args[0]\n"; - my $pid = fork_and_log($home_dir, $binary_dir, $cmd, $logfile); + my $pid = fork_and_log($home_dir, $binary_dir, $args, $logfile); my $result = wait_for_pid($pid, $timeout_secs); $now = localtime(); @@ -1269,24 +1281,30 @@ sub send_results_to_server { print_log "send_results_to_server(): \n"; print_log "tmpurl = $tmpurl\n"; - my $res = eval q{ - use LWP::UserAgent; - use HTTP::Request; - my $ua = LWP::UserAgent->new; - $ua->timeout(10); # seconds - my $req = HTTP::Request->new(GET => $tmpurl); - my $res = $ua->request($req); - return $res; - }; - if ($@) { - warn "Failed to submit startup results: $@"; - print_log "send_results_to_server() failed.\n"; - } else { - print "Results submitted to server: \n", - $res->status_line, "\n", $res->content, "\n"; + # libwww-perl has process control problems on windows, + # spawn wget instead. + if ($Settings::OS =~ /^WIN/) { + system ("wget", "-O", "/dev/null", $tmpurl); print_log "send_results_to_server() succeeded.\n"; + } else { + my $res = eval q{ + use LWP::UserAgent; + use HTTP::Request; + my $ua = LWP::UserAgent->new; + $ua->timeout(10); # seconds + my $req = HTTP::Request->new(GET => $tmpurl); + my $res = $ua->request($req); + return $res; + }; + if ($@) { + warn "Failed to submit startup results: $@"; + print_log "send_results_to_server() failed.\n"; + } else { + print "Results submitted to server: \n", + $res->status_line, "\n", $res->content, "\n"; + print_log "send_results_to_server() succeeded.\n"; + } } - } @@ -1331,54 +1349,48 @@ sub run_all_tests { # unlink("$binary_dir/component.reg") or warn "$binary_dir/component.reg not removed\n"; if($Settings::RegxpcomTest) { - AliveTest("regxpcom", $build_dir, "$binary_dir/regxpcom", 0, + AliveTest("regxpcom", $build_dir, ["$binary_dir/regxpcom"], $Settings::RegxpcomTestTimeout); } my $mozappdir="$build_dir/.mozilla"; - $mozappdir="/boot/home/config/settings/Mozilla" if ($Settings::OS eq "BeOS"); - my $profiledir="$mozappdir/$Settings::MozProfileName"; + my $profiledir = get_profile_dir($build_dir); - # no special profiledir on win32 - if ($Settings::OS !~ /^WIN/) { + # + # Make sure we have a profile to run tests. This is assumed to be called + # $Settings::MozProfileName and will live in $build_dir/.mozilla. + # Also assuming only one profile here. + # + my $cp_result = 0; + unless ((-d "$profiledir")|| + ((-d "$mozappdir/Profiles/$Settings::MozProfileName") and + ($Settings::OS eq 'Darwin'))) { + print_log "No profile found, creating profile.\n"; + $cp_result = create_profile($build_dir, $binary_dir, $binary); + } else { + print_log "Found profile.\n"; - # - # Make sure we have a profile to run tests. This is assumed to be called - # $Settings::MozProfileName and will live in $build_dir/.mozilla. - # Also assuming only one profile here. - # - my $cp_result = 0; - unless ((-d "$profiledir")|| - ((-d "$mozappdir/Profiles/$Settings::MozProfileName") and - ($Settings::OS eq 'Darwin'))) { - print_log "No profile found, creating profile.\n"; + # Recreate profile if we have $Settings::CleanProfile set. + if ($Settings::CleanProfile) { + my $deletedir = $mozappdir; + $deletedir = $profiledir if ($Settings::OS eq "BeOS" || $Settings::OS =~ /^WIN/); + print_log "Creating clean profile ...\n"; + print_log "Deleting $deletedir ...\n"; + File::Path::rmtree([$deletedir], 0, 0); + if (-e "$deletedir") { + print_log "Error: rmtree([$deletedir], 0, 0) failed.\n"; + } $cp_result = create_profile($build_dir, $binary_dir, $binary); + } + } + + # Set status, in case create profile failed. + if($cp_result) { + if(not $cp_result->{timed_out} and $cp_result->{exit_value} != 0) { + $test_result = "success"; } else { - print_log "Found profile.\n"; - - # Recreate profile if we have $Settings::CleanProfile set. - if ($Settings::CleanProfile) { - my $deletedir = $mozappdir; - $deletedir = $profiledir if ($Settings::OS eq "BeOS"); - print_log "Creating clean profile ...\n"; - print_log "Deleting $deletedir ...\n"; - File::Path::rmtree([$deletedir], 0, 0); - if (-e "$deletedir") { - print_log "Error: rmtree([$deletedir], 0, 0) failed.\n"; - } - $cp_result = create_profile($build_dir, $binary_dir, $binary); - } + $test_result = "testfailed"; } - - # Set status, in case create profile failed. - if($cp_result) { - if(not $cp_result->{timed_out} and $cp_result->{exit_value} != 0) { - $test_result = "success"; - } else { - $test_result = "testfailed"; - } - } - } # @@ -1453,7 +1465,7 @@ sub run_all_tests { # if ($Settings::AliveTest and $test_result eq 'success') { $test_result = AliveTest("MozillaAliveTest", $build_dir, - $binary, " -P $Settings::MozProfileName", + [$binary, "-P", $Settings::MozProfileName], $Settings::AliveTestTimeout); } @@ -1464,7 +1476,7 @@ sub run_all_tests { $ENV{LD_ASSUME_KERNEL} = "2.2.5"; $test_result = AliveTest("MozillaJavaTest", $build_dir, - $binary, "http://java.sun.com", + [$binary, "http://java.sun.com"], $Settings::JavaTestTimeout); } @@ -1472,20 +1484,21 @@ sub run_all_tests { # Viewer alive test if ($Settings::ViewerTest and $test_result eq 'success') { $test_result = AliveTest("ViewerAliveTest", $build_dir, - "$binary_dir/viewer", 0, + ["$binary_dir/viewer"], $Settings::ViewerTestTimeout); } # Embed test. Test the embedded app. if ($Settings::EmbedTest and $test_result eq 'success') { $test_result = AliveTest("EmbedAliveTest", $build_dir, - "$embed_binary_dir/$embed_binary_basename", 0, + ["$embed_binary_dir/$embed_binary_basename"], $Settings::EmbedTestTimeout); } # Bloat test (based on nsTraceRefcnt) if ($Settings::BloatTest and $test_result eq 'success') { - $test_result = BloatTest($binary, $build_dir, " -f bloaturls.txt", "", + $test_result = BloatTest($binary, $build_dir, + ["-f", "bloaturls.txt"], "", $Settings::BloatTestTimeout); } @@ -1526,7 +1539,7 @@ sub run_all_tests { # Remove the Inbox.msf file. # unlink("Inbox.msf"); - $test_result = BloatTest($binary, $build_dir, " -mail", "mail", + $test_result = BloatTest($binary, $build_dir, ["-mail"], "mail", $Settings::MailBloatTestTimeout); # back to build_dir @@ -1539,17 +1552,16 @@ sub run_all_tests { and $test_result eq 'success') { $test_result = FileBasedTest("DomToTextConversionTest", $build_dir, $binary_dir, - "perl TestOutSinks.pl", $Settings::DomTestTimeout, + ["perl", "TestOutSinks.pl"], $Settings::DomTestTimeout, "FAILED", 0, 0); # Timeout means failure. } # Layout performance test. if ($Settings::LayoutPerformanceTest and $test_result eq 'success') { - $test_result = LayoutPerformanceTest("LayoutPerformanceTest", - $binary, + $test_result = LayoutPerformanceTest("LayoutPerformanceTest", $build_dir, - "-P $Settings::MozProfileName"); + [$binary, "-P", $Settings::MozProfileName]); } @@ -1563,12 +1575,11 @@ sub run_all_tests { # Settle OS. run_system_cmd("sync; sleep 10", 35); - my $url = "-chrome \"file:$build_dir/mozilla/xpfe/test/winopen.xul\""; + my @urlargs = (-chrome,"file:$build_dir/mozilla/xpfe/test/winopen.xul"); if($test_result eq 'success') { $open_time = AliveTestReturnToken($test_name, $build_dir, - $binary, - " -P $Settings::MozProfileName " . $url, + [$binary, "-P", $Settings::MozProfileName, @urlargs], $Settings::XULWindowOpenTestTimeout, "__xulWinOpenTime", ":"); @@ -1598,16 +1609,16 @@ sub run_all_tests { if ($Settings::StartupPerformanceTest and $test_result eq 'success') { - # Win32 needs to do some url magic for file: urls. - my $startup_build_dir = $build_dir; - if ($Settings::OS =~ /^WIN/) { - $startup_build_dir = $win32_build_dir; - } + # Win32 needs to do some url magic for file: urls. + my $startup_build_dir = $build_dir; + if ($Settings::OS =~ /^WIN/) { + $startup_build_dir = $win32_build_dir; + } $test_result = StartupPerformanceTest("StartupPerformanceTest", $binary, $startup_build_dir, - "-P $Settings::MozProfileName", + ["-P", $Settings::MozProfileName], "file:$startup_build_dir/../startup-test.html"); } @@ -1620,18 +1631,13 @@ sub run_all_tests { # after $timeout_secs (seconds). # sub AliveTest { - my ($test_name, $build_dir, $binary, $args, $timeout_secs) = @_; + my ($test_name, $build_dir, $args, $timeout_secs) = @_; + my $binary = @$args[0]; my $binary_basename = File::Basename::basename($binary); my $binary_dir = File::Basename::dirname($binary); my $binary_log = "$build_dir/$test_name.log"; - my $cmd = $binary_basename; local $_; - # Build up command string, if we have arguments - if($args) { - $cmd .= " " . $args; - } - # Print out testname print_log "\n\nRunning $test_name test ...\n"; @@ -1643,7 +1649,7 @@ sub AliveTest { # Print out timeout. print_log "Timeout = $timeout_secs seconds.\n"; - my $result = run_cmd($build_dir, $binary_dir, $cmd, + my $result = run_cmd($build_dir, $binary_dir, $args, $binary_log, $timeout_secs); print_logfile($binary_log, "$test_name"); @@ -1661,16 +1667,17 @@ sub AliveTest { # Same as AliveTest, but look for a token in the log and return # the value. (used for startup iteration test). sub AliveTestReturnToken { - my ($test_name, $build_dir, $binary, $args, $timeout_secs, $token, $delimiter) = @_; + my ($test_name, $build_dir, $args, $timeout_secs, $token, $delimiter) = @_; my $status; my $rv = 0; # Same as in AliveTest, needs to match in order to find the log file. + my $binary = @$args[0]; my $binary_basename = File::Basename::basename($binary); my $binary_dir = File::Basename::dirname($binary); my $binary_log = "$build_dir/$test_name.log"; - $status = AliveTest($test_name, $build_dir, $binary, $args, $timeout_secs); + $status = AliveTest($test_name, $build_dir, $args, $timeout_secs); # Look for and return token if ($status) { @@ -1705,18 +1712,18 @@ sub AliveTestReturnToken { # the process flow control got too confusing :( -mcafee # sub FileBasedTest { - my ($test_name, $build_dir, $binary_dir, $test_command, $timeout_secs, + my ($test_name, $build_dir, $binary_dir, $test_args, $timeout_secs, $status_token, $status_token_means_pass, $timeout_is_ok) = @_; local $_; - # Assume the app is the first argument in the execString. - my ($binary_basename) = (split /\s+/, $test_command)[0]; + # Assume the app is the first argument in the array. + my ($binary_basename) = @$test_args[0]; my $binary_log = "$build_dir/$test_name.log"; # Print out test name print_log "\n\nRunning $test_name ...\n"; - my $result = run_cmd($build_dir, $binary_dir, $test_command, + my $result = run_cmd($build_dir, $binary_dir, $test_args, $binary_log, $timeout_secs); print_logfile($binary_log, $test_name); @@ -1749,7 +1756,7 @@ sub FileBasedTest { sub LayoutPerformanceTest { - my ($test_name, $binary, $build_dir, $layout_test_args) = @_; + my ($test_name, $build_dir, $args) = @_; my $layout_test_result; my $layout_time; my $layout_time_details; @@ -1761,8 +1768,7 @@ sub LayoutPerformanceTest { $layout_time = AliveTestReturnToken($test_name, $build_dir, - $binary, - " $layout_test_args \"$url\"", + [@$args, $url], $Settings::LayoutPerformanceTestTimeout, "_x_x_mozilla_page_load", ","); @@ -1780,8 +1786,7 @@ sub LayoutPerformanceTest { $layout_time = AliveTestReturnToken($test_name, $build_dir, - $binary, - " $layout_test_args \"$url\"", + [@$args, $url], $Settings::LayoutPerformanceTestTimeout, "_x_x_mozilla_page_load", ","); @@ -1850,7 +1855,7 @@ sub StartupPerformanceTest { # Generate URL of form file:////startup-test.html?begin=986869495000 # Where begin value is current time. - my ($time, $url, $cwd, $cmd); + my ($time, $url, $cwd); # # Test for Time::HiRes and report the time. @@ -1873,8 +1878,7 @@ sub StartupPerformanceTest { $startuptime = AliveTestReturnToken("StartupPerformanceTest-$i", $build_dir, - "$binary", - " $startup_test_args \"$url\"", + [$binary, @$startup_test_args, $url], $Settings::StartupPerformanceTestTimeout, "__startuptime", ","); @@ -1939,7 +1943,7 @@ sub StartupPerformanceTest { # to turn the pageloader code on. These are on by default for debug. # sub BloatTest { - my ($binary, $build_dir, $args, $bloatdiff_label, $timeout_secs) = @_; + my ($binary, $build_dir, $bloat_args, $bloatdiff_label, $timeout_secs) = @_; my $binary_basename = File::Basename::basename($binary); my $binary_dir = File::Basename::dirname($binary); my $binary_log = "$build_dir/bloat-cur.log"; @@ -1956,13 +1960,13 @@ sub BloatTest { $ENV{XPCOM_MEM_BLOAT_LOG} = 1; # Turn on ref counting to track leaks. # Build up binary command, look for profile. - my $cmd = "$binary_basename"; + my @args = ($binary_basename); unless ($Settings::MozProfileName eq "") { - $cmd .= " -P $Settings::MozProfileName"; + @args = (@args, "-P", $Settings::MozProfileName); } - $cmd .= " $args"; + @args = (@args, @$bloat_args); - my $result = run_cmd($build_dir, $binary_dir, $cmd, $binary_log, + my $result = run_cmd($build_dir, $binary_dir, \@args, $binary_log, $timeout_secs); $ENV{XPCOM_MEM_BLOAT_LOG} = 0; delete $ENV{XPCOM_MEM_BLOAT_LOG}; @@ -2159,10 +2163,11 @@ sub BloatTest2 { rename($sdleak_log, $old_sdleak_log); - my $cmd = "$binary_basename -P $Settings::MozProfileName -f bloaturls.txt --trace-malloc $malloc_log"; + my @args = ($binary_basename, "-P", $Settings::MozProfileName, + "-f", "bloaturls.txt", "--trace-malloc", $malloc_log); # win32 builds crash on multiple runs when --shutdown-leaks is used - $cmd .= " --shutdown-leaks $sdleak_log" unless $Settings::OS =~ /^WIN/; - my $result = run_cmd($build_dir, $binary_dir, $cmd, $binary_log, + @args = (@args, "--shutdown-leaks", $sdleak_log) unless $Settings::OS =~ /^WIN/; + my $result = run_cmd($build_dir, $binary_dir, \@args, $binary_log, $timeout_secs); print_logfile($binary_log, "trace-malloc bloat test"); @@ -2179,11 +2184,11 @@ sub BloatTest2 { rename($leakstats_log, $old_leakstats_log); if ($Settings::OS =~ /^WIN/) { - $cmd = "leakstats $malloc_log"; + @args = ("leakstats", $malloc_log); } else { - $cmd = "run-mozilla.sh ./leakstats $malloc_log"; + @args = ("run-mozilla.sh", "./leakstats", $malloc_log); } - $result = run_cmd($build_dir, $binary_dir, $cmd, $leakstats_log, + $result = run_cmd($build_dir, $binary_dir, \@args, $leakstats_log, $timeout_secs); print_logfile($leakstats_log, "trace-malloc bloat test: leakstats"); @@ -2228,8 +2233,8 @@ sub BloatTest2 { if (-e $old_sdleak_log && -e $sdleak_log) { print_logfile($old_leakstats_log, "previous run of trace-malloc bloat test leakstats"); - $cmd = "$PERL $build_dir/mozilla/tools/trace-malloc/diffbloatdump.pl --depth=15 $old_sdleak_log $sdleak_log"; - $result = run_cmd($build_dir, $binary_dir, $cmd, $sdleak_diff_log, + @args = ($PERL, "$build_dir/mozilla/tools/trace-malloc/diffbloatdump.pl", "--depth=15", $old_sdleak_log, $sdleak_log); + $result = run_cmd($build_dir, $binary_dir, \@args, $sdleak_diff_log, $timeout_secs); print_logfile($sdleak_diff_log, "trace-malloc leak stats differences"); } diff --git a/mozilla/tools/tinderbox/gettime.pl b/mozilla/tools/tinderbox/gettime.pl index b962b8e9bd4..46697782e16 100644 --- a/mozilla/tools/tinderbox/gettime.pl +++ b/mozilla/tools/tinderbox/gettime.pl @@ -30,7 +30,7 @@ sub getTime () { return &$timesub if $^O eq "MacOS"; # don't know a better way on Mac - if ($^O eq "MSWin32" || $^O eq "cygwin") { #XXX not tested on cygwin + if ($^O eq "MSWin32") { eval "use Win32::API;"; $timesub = sub { # pass pointer to struct, void return diff --git a/mozilla/tools/tinderbox/tinder-defaults.pl b/mozilla/tools/tinderbox/tinder-defaults.pl index 962b10b1084..4d754b65c89 100644 --- a/mozilla/tools/tinderbox/tinder-defaults.pl +++ b/mozilla/tools/tinderbox/tinder-defaults.pl @@ -17,6 +17,7 @@ $BuildEmbed = 0; # After building seamonkey, go build embed app. # Tests $CleanProfile = 0; $ResetHomeDirForTests = 1; +$ProductName = "Mozilla"; $RunMozillaTests = 1; # Allow turning off of all tests if needed. # renamed from RunTest, to be more descriptive.