only turn on jprof JS is TestWithJprof is on r=coop b=347966

This commit is contained in:
rhelmer%mozilla.com 2007-10-01 17:43:22 +00:00
Родитель 0d6a4c93a5
Коммит a6c83de184
3 изменённых файлов: 23 добавлений и 1 удалений

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

@ -24,7 +24,7 @@ use Config; # for $Config{sig_name} and $Config{sig_num}
use File::Find ();
use File::Copy;
$::UtilsVersion = '$Revision: 1.372 $ ';
$::UtilsVersion = '$Revision: 1.373 $ ';
package TinderUtils;
@ -2492,6 +2492,9 @@ sub run_all_tests {
run_system_cmd("sync; sleep 5", 35);
my @urlargs = (-chrome,"file:$build_dir/mozilla/xpfe/test/winopen.xul");
if ($Settings::TestWithJprof) {
@urlargs = (-chrome,"javascript:try{JProfStartProfiling();}catch(e){};window.location='file:$build_dir/mozilla/xpfe/test/winopen.xul'");
}
if($test_result eq 'success') {
if ($talkback_installed) {
setTestnameForTalkbackReport($talkback_ini_path,$test_name);
@ -2684,6 +2687,11 @@ sub AliveTestReturnToken {
}
}
if ($Settings::TestWithJprof) {
print_log "Running jprof for $test_name..\n";
run_shell_command("cd $binary_dir && ./jprof firefox-bin jprof-log > ../$test_name-jprof.html");
}
return $rv;
}
@ -2758,6 +2766,9 @@ sub LayoutPerformanceTest {
my $layout_time_details;
my $binary_log = "$build_dir/$test_name.log";
my $url = "http://$Settings::pageload_server/page-loader/loader.pl?delay=1000&nocache=0&maxcyc=4&timeout=$Settings::LayoutPerformanceTestPageTimeout&auto=1";
if ($Settings::TestWithJprof) {
$url = "javascript:try{JProfStartProfiling();}catch(e){};window.location='http://$Settings::pageload_server/page-loader/loader.pl?delay=1000&nocache=0&maxcyc=4&timeout=$Settings::LayoutPerformanceTestPageTimeout&auto=1'";
}
# Settle OS.
run_system_cmd("sync; sleep 5", 35);
@ -2834,6 +2845,9 @@ sub LayoutPerformanceLocalTest {
my $layout_time_details;
my $binary_log = "$build_dir/$test_name.log";
my $url = "http://localhost/pageload/cycler.html";
if ($Settings::TestWithJprof) {
$url = "javascript:try{JProfStartProfiling();}catch(e){};window.location='http://localhost/pageload/cycler.html'";
}
# Settle OS.
run_system_cmd("sync; sleep 5", 35);
@ -2890,6 +2904,9 @@ sub DHTMLPerformanceTest {
my $dhtml_time_details;
my $binary_log = "$build_dir/$test_name.log";
my $url = "http://www.mozilla.org/performance/test-cases/dhtml/runTests.html";
if ($Settings::TestWithJprof) {
$url = "javascript:try{JProfStartProfiling();}catch(e){};window.location='http://www.mozilla.org/performance/test-cases/dhtml/runTests.html'";
}
# Settle OS.
run_system_cmd("sync; sleep 5", 35);

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

@ -337,6 +337,10 @@ sub packit {
$push_raw_xpis = $Settings::push_raw_xpis;
}
if ($Settings::TestWithJprof) {
TinderUtils::run_shell_command("cp $package_location/../*-jprof.html $stagedir/");
}
if (TinderUtils::is_windows() || TinderUtils::is_os2()) {
if ($Settings::stub_installer) {
TinderUtils::run_shell_command("cp $package_location/stub/*.exe $stagedir/");

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

@ -82,6 +82,7 @@ $RunUnitTests = 0; # TUnit
# ("network","dom","toolkit","security/manager");
$CompareLocalesAviary = 0; # Should the compare-locales commands use the
# aviary directory structure?
$TestWithJprof = 0; # Use jprof profiler during tests
$TestsPhoneHome = 0; # Should test report back to server?
$GraphNameOverride = ''; # Override name built from ::hostname() and $BuildTag