From 815fb6ff7ecdf34549a91082fdcd00ffe9919eb9 Mon Sep 17 00:00:00 2001 From: "mcafee%netscape.com" Date: Fri, 10 Mar 2000 02:48:01 +0000 Subject: [PATCH] Added AliveTest variable for tinder-config.pl, fixed MailNewsTest. r=slamm git-svn-id: svn://10.0.0.236/trunk@62521 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/tools/tinderbox/build-seamonkey.pl | 42 +++++++++++++++------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/mozilla/tools/tinderbox/build-seamonkey.pl b/mozilla/tools/tinderbox/build-seamonkey.pl index c56fa88515e..ab5a58b8288 100755 --- a/mozilla/tools/tinderbox/build-seamonkey.pl +++ b/mozilla/tools/tinderbox/build-seamonkey.pl @@ -11,7 +11,7 @@ use POSIX qw(sys_wait_h strftime); use Cwd; use File::Basename; # for basename(); use Config; # for $Config{sig_name} and $Config{sig_num} -$::Version = '$Revision: 1.81 $ '; +$::Version = '$Revision: 1.82 $ '; sub PrintUsage { die < /dev/null")) { + open PREFS, ">>$pref_file" or die "can't open $?\n"; + print PREFS "user_pref(\"signed.applets.codebase_principal_support\", true);\n"; + print PREFS "user_pref(\"security.principal.X0\", \"[Codebase http://www.mozilla.org/quality/mailnews/APITest.html] UniversalBrowserRead=1 UniversalXPConnect=1\");"; + close PREFS; + } + $test_result = FileBasedTest("MailNewsTest", $build_dir, $binary_dir, $cmd, 90, - "MAILNEWS TEST: Passed", 1); + "MAILNEWS TEST: Passed", 1, + 1); # Timeout is Ok. } # Editor test @@ -356,7 +370,8 @@ sub run_tests { $test_result = FileBasedTest("DomToTextConversionTest", $build_dir, $binary_dir, "TestOutSinks", 45, - "FAILED", 0); + "FAILED", 0, + 0); # Timeout means failure. } return $test_result; } @@ -616,12 +631,14 @@ sub AliveTest { # failure string. If this is set to 1, then invert logic to look for # success string. # +# timeout_is_ok = Don't report test failure if test times out. +# # Note: I tried to merge this function with AliveTest(), # the process flow control got too confusing :( -mcafee # sub FileBasedTest { my ($test_name, $build_dir, $binary_dir, $test_command, $timeout_secs, - $status_token, $status_token_means_pass) = @_; + $status_token, $status_token_means_pass, $timeout_is_ok) = @_; local $_; # Assume the app is the first argument in the execString. @@ -633,7 +650,7 @@ sub FileBasedTest { print_logfile($binary_log, $test_name); - if ($result->{timed_out}) { + if (($result->{timed_out}) and (!$timeout_is_ok)) { print_log "Error: $test_name timed out after $timeout_secs seconds.\n"; return 'testfailed'; } elsif ($result->{exit_value} != 0) { @@ -720,13 +737,12 @@ $UseTimeStamp = 1; # Use the CVS 'pull-by-timestamp' option, or not $BuildOnce = 0; # Build once, don't send results to server $RunTest = 1; # Run the smoke tests on successful build, or not $TestOnly = 0; # Only run tests, don't pull/build -# Extra tests -$BloatTest = 0; -$BloatStats = 0; -$DomToTextConversionTest = 0; -$EditorTest = 0; -$MailNewsTest = 0; +# Tests +$AliveTest = 1; $ViewerTest = 0; +$BloatTest = 0; +$DomToTextConversionTest = 0; +$MailNewsTest = 0; $MozConfigFileName = 'mozconfig'; #- Set these to what makes sense for your system