зеркало из https://github.com/mozilla/pjs.git
add RunUnitTests as a new tinderbox test. b=347820, r=preed
This commit is contained in:
Родитель
8ee9bef1e3
Коммит
17a1334cde
|
@ -24,7 +24,7 @@ use Config; # for $Config{sig_name} and $Config{sig_num}
|
|||
use File::Find ();
|
||||
use File::Copy;
|
||||
|
||||
$::UtilsVersion = '$Revision: 1.332 $ ';
|
||||
$::UtilsVersion = '$Revision: 1.333 $ ';
|
||||
|
||||
package TinderUtils;
|
||||
|
||||
|
@ -1981,7 +1981,8 @@ sub run_all_tests {
|
|||
$Settings::QATest or
|
||||
$Settings::BloatTest2 or
|
||||
$Settings::BloatTest or
|
||||
$Settings::RenderPerformanceTest) {
|
||||
$Settings::RenderPerformanceTest or
|
||||
$Settings::RunUnitTests) {
|
||||
|
||||
# Chances are we will be timing these tests. Bring gettime() into memory
|
||||
# by calling it once, before any tests run.
|
||||
|
@ -2328,6 +2329,13 @@ sub run_all_tests {
|
|||
}
|
||||
}
|
||||
|
||||
# run TUnit
|
||||
if ($Settings::RunUnitTests and $test_result eq 'success') {
|
||||
$test_result = RunUnitTests("RunUnitTests",
|
||||
$build_dir, "mozilla",
|
||||
["make", "-k", "check"]);
|
||||
}
|
||||
|
||||
return $test_result;
|
||||
}
|
||||
|
||||
|
@ -3092,6 +3100,28 @@ sub BloatTest {
|
|||
return 'success';
|
||||
}
|
||||
|
||||
#
|
||||
# Run all unit tests
|
||||
#
|
||||
|
||||
sub RunUnitTests {
|
||||
my ($test_name, $build_dir, $binary_dir, $args) = @_;
|
||||
my $test_result;
|
||||
my $binary_log = "$build_dir/$test_name.log";
|
||||
|
||||
my $unit_test_result = FileBasedTest($test_name, $build_dir, $binary_dir,
|
||||
[@$args],
|
||||
$Settings::RunUnitTestsTimeout,
|
||||
"FAIL", 0, 1);
|
||||
|
||||
if ($unit_test_result eq 'testfailed') {
|
||||
print_log "TinderboxPrint:TUnit:[FAILED]\n";
|
||||
return 'testfailed';
|
||||
}
|
||||
|
||||
return 'success';
|
||||
}
|
||||
|
||||
# Page loader (-f option):
|
||||
# If you are building optimized, you need to add
|
||||
# --enable-trace-malloc --enable-perf-metrics
|
||||
|
|
|
@ -74,6 +74,7 @@ $XULWindowOpenTest = 0; # Txul
|
|||
$StartupPerformanceTest = 0; # Ts
|
||||
$NeckoUnitTest = 0;
|
||||
$RenderPerformanceTest = 0; # Tgfx
|
||||
$RunUnitTests = 0; # TUnit
|
||||
@CompareLocaleDirs = (); # Run compare-locales test on these directories
|
||||
# ("network","dom","toolkit","security/manager");
|
||||
$CompareLocalesAviary = 0; # Should the compare-locales commands use the
|
||||
|
@ -117,6 +118,7 @@ $StartupPerformanceTestTimeout = 15; # seconds
|
|||
$NeckoUnitTestTimeout = 30; # seconds
|
||||
$XULWindowOpenTestTimeout = 150; # seconds
|
||||
$RenderTestTimeout = 1800; # seconds
|
||||
$RunUnitTestsTimeout = 600; # seconds
|
||||
|
||||
$MozConfigFileName = 'mozconfig';
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче