mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 03:17:55 +00:00
fix travis bots
- increase timeout so we load all tests - mark a few more failures - skip unittest tests until we re-triage them Review URL: https://codereview.chromium.org/2279053002 .
This commit is contained in:
parent
bc50963a61
commit
8081afc785
|
@ -11,8 +11,7 @@ import 'package:args/command_runner.dart' show UsageException;
|
||||||
import 'package:path/path.dart' as path;
|
import 'package:path/path.dart' as path;
|
||||||
|
|
||||||
import '../analyzer/context.dart' show AnalyzerOptions;
|
import '../analyzer/context.dart' show AnalyzerOptions;
|
||||||
import 'compiler.dart'
|
import 'compiler.dart' show BuildUnit, CompilerOptions, ModuleCompiler;
|
||||||
show BuildUnit, CompilerOptions, JSModuleFile, ModuleCompiler;
|
|
||||||
import 'module_builder.dart';
|
import 'module_builder.dart';
|
||||||
|
|
||||||
final ArgParser _argParser = () {
|
final ArgParser _argParser = () {
|
||||||
|
|
|
@ -6,7 +6,7 @@ var pathToModule = function(path) {
|
||||||
};
|
};
|
||||||
|
|
||||||
var testsToSkip = [
|
var testsToSkip = [
|
||||||
// syntax error:
|
// syntax error in DDC's generated code:
|
||||||
'/base/gen/codegen_output/language/execute_finally6_test.js',
|
'/base/gen/codegen_output/language/execute_finally6_test.js',
|
||||||
'/base/gen/codegen_output/language/switch_label2_test.js',
|
'/base/gen/codegen_output/language/switch_label2_test.js',
|
||||||
'/base/gen/codegen_output/language/infinite_switch_label_test.js',
|
'/base/gen/codegen_output/language/infinite_switch_label_test.js',
|
||||||
|
@ -14,12 +14,19 @@ var testsToSkip = [
|
||||||
'/base/gen/codegen_output/language/nested_switch_label_test.js',
|
'/base/gen/codegen_output/language/nested_switch_label_test.js',
|
||||||
'/base/gen/codegen_output/language/switch_try_catch_test.js',
|
'/base/gen/codegen_output/language/switch_try_catch_test.js',
|
||||||
|
|
||||||
// module code execution error:
|
// module code execution error in DDC's generated code:
|
||||||
'/base/gen/codegen_output/language/f_bounded_quantification3_test.js',
|
'/base/gen/codegen_output/language/f_bounded_quantification3_test.js',
|
||||||
'/base/gen/codegen_output/language/regress_16640_test.js',
|
'/base/gen/codegen_output/language/regress_16640_test.js',
|
||||||
'/base/gen/codegen_output/language/regress_22666_test.js',
|
'/base/gen/codegen_output/language/regress_22666_test.js',
|
||||||
|
'/base/gen/codegen_output/language/cyclic_type_test_00_multi.js',
|
||||||
|
'/base/gen/codegen_output/language/cyclic_type_test_01_multi.js',
|
||||||
|
'/base/gen/codegen_output/language/cyclic_type_test_02_multi.js',
|
||||||
|
'/base/gen/codegen_output/language/cyclic_type_test_03_multi.js',
|
||||||
|
'/base/gen/codegen_output/language/cyclic_type_test_04_multi.js',
|
||||||
|
'/base/gen/codegen_output/language/cyclic_type_test_none_multi.js',
|
||||||
'/base/gen/codegen_output/language/cyclic_type2_test.js',
|
'/base/gen/codegen_output/language/cyclic_type2_test.js',
|
||||||
'/base/gen/codegen_output/language/mixin_regress_13688_test.js',
|
'/base/gen/codegen_output/language/mixin_regress_13688_test.js',
|
||||||
|
'/base/gen/codegen_output/language/least_upper_bound_expansive_test_none_multi.js'
|
||||||
];
|
];
|
||||||
|
|
||||||
Object.keys(window.__karma__.files).forEach(function(file) {
|
Object.keys(window.__karma__.files).forEach(function(file) {
|
||||||
|
@ -33,9 +40,12 @@ allTestFiles.push('test/browser/language_tests');
|
||||||
allTestFiles.push('test/browser/runtime_tests');
|
allTestFiles.push('test/browser/runtime_tests');
|
||||||
|
|
||||||
require.config({
|
require.config({
|
||||||
// Karma serves files under /base, which is the basePath from your config file
|
// Karma serves files under /base.
|
||||||
baseUrl: '/base',
|
baseUrl: '/base',
|
||||||
|
|
||||||
|
// Travis bots take a bit longer to load all ~2k test files.
|
||||||
|
waitSeconds: 30,
|
||||||
|
|
||||||
paths: {
|
paths: {
|
||||||
dart_sdk: 'lib/js/amd/dart_sdk',
|
dart_sdk: 'lib/js/amd/dart_sdk',
|
||||||
async_helper: 'gen/codegen_output/pkg/async_helper',
|
async_helper: 'gen/codegen_output/pkg/async_helper',
|
||||||
|
@ -47,9 +57,9 @@ require.config({
|
||||||
unittest: 'gen/codegen_output/pkg/unittest',
|
unittest: 'gen/codegen_output/pkg/unittest',
|
||||||
},
|
},
|
||||||
|
|
||||||
// dynamically load all test files
|
// Require all test files before starting tests.
|
||||||
deps: allTestFiles,
|
deps: allTestFiles,
|
||||||
|
|
||||||
// we have to kickoff jasmine, as it is asynchronous
|
// We have to kickoff jasmine, as it is asynchronous
|
||||||
callback: window.__karma__.start
|
callback: window.__karma__.start
|
||||||
});
|
});
|
||||||
|
|
|
@ -378,6 +378,10 @@ define(['dart_sdk', 'async_helper', 'unittest', 'require'],
|
||||||
'set_test': fail, // runtime strong mode reject
|
'set_test': fail, // runtime strong mode reject
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'corelib/regexp': {
|
||||||
|
'default_arguments_test': fail
|
||||||
|
},
|
||||||
|
|
||||||
'lib/convert': {
|
'lib/convert': {
|
||||||
'encoding_test': skip_timeout,
|
'encoding_test': skip_timeout,
|
||||||
|
|
||||||
|
@ -732,6 +736,9 @@ define(['dart_sdk', 'async_helper', 'unittest', 'require'],
|
||||||
let matches = text.match(regex);
|
let matches = text.match(regex);
|
||||||
return matches ? matches.length : 0;
|
return matches ? matches.length : 0;
|
||||||
}
|
}
|
||||||
|
function libraryName(name) {
|
||||||
|
return name.replace(/-/g, '$45');
|
||||||
|
}
|
||||||
|
|
||||||
let unittest_tests = [];
|
let unittest_tests = [];
|
||||||
|
|
||||||
|
@ -740,11 +747,10 @@ define(['dart_sdk', 'async_helper', 'unittest', 'require'],
|
||||||
html_config.useHtmlConfiguration();
|
html_config.useHtmlConfiguration();
|
||||||
// We need to let Dart unittest control when tests are run not mocha.
|
// We need to let Dart unittest control when tests are run not mocha.
|
||||||
// mocha.allowUncaught(true);
|
// mocha.allowUncaught(true);
|
||||||
let dartUnittestsLeft = 0;
|
|
||||||
for (let testFile of allTestFiles) {
|
for (let testFile of allTestFiles) {
|
||||||
let match = languageTestPattern.exec(testFile);
|
let match = languageTestPattern.exec(testFile);
|
||||||
if (match != null) {
|
if (match != null) {
|
||||||
let status_group = match[1]
|
let status_group = match[1];
|
||||||
let name = match[2];
|
let name = match[2];
|
||||||
let module = match[0];
|
let module = match[0];
|
||||||
|
|
||||||
|
@ -774,7 +780,7 @@ define(['dart_sdk', 'async_helper', 'unittest', 'require'],
|
||||||
if (has('unittest')) {
|
if (has('unittest')) {
|
||||||
unittest_tests.push(() => {
|
unittest_tests.push(() => {
|
||||||
console.log('Running unittest test ' + testFile);
|
console.log('Running unittest test ' + testFile);
|
||||||
require(module)[name].main();
|
require(module)[libraryName(name)].main();
|
||||||
});
|
});
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -792,7 +798,7 @@ define(['dart_sdk', 'async_helper', 'unittest', 'require'],
|
||||||
async_helper.asyncTestInitialize(done);
|
async_helper.asyncTestInitialize(done);
|
||||||
console.debug('Running test: ' + name);
|
console.debug('Running test: ' + name);
|
||||||
|
|
||||||
let mainLibrary = require(module)[name];
|
let mainLibrary = require(module)[libraryName(name)];
|
||||||
let negative = /negative_test/.test(name);
|
let negative = /negative_test/.test(name);
|
||||||
if (has('slow')) this.timeout(10000);
|
if (has('slow')) this.timeout(10000);
|
||||||
if (has('fail')) {
|
if (has('fail')) {
|
||||||
|
@ -821,6 +827,10 @@ define(['dart_sdk', 'async_helper', 'unittest', 'require'],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO(jmesserly): unitttest tests are currently broken
|
||||||
|
// https://github.com/dart-lang/dev_compiler/issues/631
|
||||||
|
return;
|
||||||
|
|
||||||
let mochaOnError;
|
let mochaOnError;
|
||||||
// We run these tests in a mocha test wrapper to avoid the confusing failure
|
// We run these tests in a mocha test wrapper to avoid the confusing failure
|
||||||
// case of dart unittests being interleaved with mocha tests.
|
// case of dart unittests being interleaved with mocha tests.
|
||||||
|
|
Loading…
Reference in a new issue