1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-08 12:06:26 +00:00

Remove the old "preview Dart 2" flags from the test runner.

Dart 2 shipped a year ago, so we're pretty well past a "preview". :)

Change-Id: I6c5d21ae4181e4228cc1fc49b6344cdb8fc43794
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115544
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
This commit is contained in:
Robert Nystrom 2019-09-05 16:59:43 +00:00 committed by commit-bot@chromium.org
parent aa34de3fe5
commit 89ad636b58
17 changed files with 25 additions and 116 deletions

View File

@ -3,14 +3,6 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:io';
// TODO(rnystrom): Differences from test.dart's version:
// - Remove special handling for "ff" as firefox.
// - "windows" -> "win".
// - "macos" -> "mac".
// - toString() on enum classes is just name.
// - builderTag and babel default to empty string, not null.
// Need to migrate test.dart to not expect the above before it can use this.
// READ ME! If you add a new field to this, make sure to add it to
// [parse()], [optionsEqual()], [hashCode], and [toString()]. A good check is to
// comment out an existing field and see what breaks. Every error is a place
@ -257,7 +249,6 @@ class Configuration {
isCsp: boolOption("csp"),
isHostChecked: boolOption("host-checked"),
isMinified: boolOption("minified"),
previewDart2: boolOption("preview-dart-2"),
useAnalyzerCfe: boolOption("use-cfe"),
useAnalyzerFastaParser: boolOption("analyzer-use-fasta-parser"),
useBlobs: boolOption("use-blobs"),
@ -308,9 +299,6 @@ class Configuration {
final bool isMinified;
// TODO(rnystrom): Remove this when Dart 1.0 is no longer supported.
final bool previewDart2;
// TODO(whesse): Remove these when only fasta front end is in analyzer.
final bool useAnalyzerCfe;
final bool useAnalyzerFastaParser;
@ -336,7 +324,6 @@ class Configuration {
bool isCsp,
bool isHostChecked,
bool isMinified,
bool previewDart2,
bool useAnalyzerCfe,
bool useAnalyzerFastaParser,
bool useBlobs,
@ -354,7 +341,6 @@ class Configuration {
isCsp = isCsp ?? false,
isHostChecked = isHostChecked ?? false,
isMinified = isMinified ?? false,
previewDart2 = previewDart2 ?? true,
useAnalyzerCfe = useAnalyzerCfe ?? false,
useAnalyzerFastaParser = useAnalyzerFastaParser ?? false,
useBlobs = useBlobs ?? false,
@ -381,7 +367,6 @@ class Configuration {
isCsp == other.isCsp &&
isHostChecked == other.isHostChecked &&
isMinified == other.isMinified &&
previewDart2 == other.previewDart2 &&
useAnalyzerCfe == other.useAnalyzerCfe &&
useAnalyzerFastaParser == other.useAnalyzerFastaParser &&
useBlobs == other.useBlobs &&
@ -414,7 +399,6 @@ class Configuration {
isCsp,
isHostChecked,
isMinified,
previewDart2,
useAnalyzerCfe,
useAnalyzerFastaParser,
useBlobs,
@ -448,7 +432,6 @@ class Configuration {
if (isCsp) fields.add("csp");
if (isHostChecked) fields.add("host-checked");
if (isMinified) fields.add("minified");
if (previewDart2) fields.add("preview-dart-2");
if (useAnalyzerCfe) fields.add("use-cfe");
if (useAnalyzerFastaParser) fields.add("analyzer-use-fasta-parser");
if (useBlobs) fields.add("use-blobs");
@ -509,9 +492,6 @@ class Configuration {
if (isMinified || other.isMinified) {
fields.add("isMinified $isMinified ${other.isMinified}");
}
if (previewDart2 || other.previewDart2) {
fields.add("previewDart2 $previewDart2 ${other.previewDart2}");
}
if (useAnalyzerCfe || other.useAnalyzerCfe) {
fields.add("useAnalyzerCfe $useAnalyzerCfe ${other.useAnalyzerCfe}");
}

View File

@ -206,7 +206,6 @@ void main() {
"csp": true,
"host-checked": true,
"minified": true,
"preview-dart-2": true,
"hot-reload": true,
"hot-reload-rollback": true,
"use-sdk": true,
@ -226,7 +225,6 @@ void main() {
isCsp: true,
isHostChecked: true,
isMinified: true,
previewDart2: true,
useHotReload: true,
useHotReloadRollback: true,
useSdk: true,

View File

@ -44,8 +44,6 @@ abstract class CompilerConfiguration {
bool get _useEnableAsserts => _configuration.useEnableAsserts;
bool get previewDart2 => !_configuration.noPreviewDart2;
/// Whether to run the runtime on the compilation result of a test which
/// expects a compile-time error and the compiler did not emit one.
bool get runRuntimeDespiteMissingCompileTimeError => false;
@ -941,10 +939,6 @@ class AnalyzerCompilerConfiguration extends CompilerConfiguration {
CommandArtifact computeCompilationArtifact(String tempDir,
List<String> arguments, Map<String, String> environmentOverrides) {
if (!previewDart2) {
throw ArgumentError('--no-preview-dart-2 not supported');
}
var args = [
...arguments,
if (_configuration.useAnalyzerCfe) '--use-cfe',
@ -985,10 +979,6 @@ class CompareAnalyzerCfeCompilerConfiguration extends CompilerConfiguration {
CommandArtifact computeCompilationArtifact(String tempDir,
List<String> arguments, Map<String, String> environmentOverrides) {
if (!previewDart2) {
throw ArgumentError('--no-preview-dart-2 not supported');
}
// Since this is not a real compilation, no artifacts are produced.
return CommandArtifact([
CompareAnalyzerCfeCommand(
@ -1113,8 +1103,6 @@ class FastaCompilerConfiguration extends CompilerConfiguration {
final Uri _vmExecutable;
bool get _isLegacy => _configuration.noPreviewDart2;
factory FastaCompilerConfiguration(TestConfiguration configuration) {
var buildDirectory =
Uri.base.resolveUri(Uri.directory(configuration.buildDirectory));
@ -1124,8 +1112,7 @@ class FastaCompilerConfiguration extends CompilerConfiguration {
dillDir = buildDirectory.resolve("dart-sdk/lib/_internal/");
}
var suffix = !configuration.noPreviewDart2 ? "_strong" : "";
var platformDill = dillDir.resolve("vm_platform$suffix.dill");
var platformDill = dillDir.resolve("vm_platform_strong.dill");
var vmExecutable = buildDirectory
.resolve(configuration.useSdk ? "dart-sdk/bin/dart" : "dart");
@ -1152,7 +1139,6 @@ class FastaCompilerConfiguration extends CompilerConfiguration {
var compilerArguments = [
'--verify',
if (_isLegacy) "--legacy-mode",
"-o",
outputFileName,
"--platform",

View File

@ -112,7 +112,6 @@ class TestConfiguration {
bool get isHostChecked => configuration.isHostChecked;
bool get isCsp => configuration.isCsp;
bool get isMinified => configuration.isMinified;
bool get noPreviewDart2 => !configuration.previewDart2;
bool get useAnalyzerCfe => configuration.useAnalyzerCfe;
bool get useAnalyzerFastaParser => configuration.useAnalyzerFastaParser;
bool get useBlobs => configuration.useBlobs;
@ -461,7 +460,6 @@ class TestConfiguration {
'use_sdk': useSdk,
'builder_tag': builderTag,
'timeout': timeout,
'no_preview_dart_2': noPreviewDart2,
'use_cfe': useAnalyzerCfe,
'analyzer_use_fasta_parser': useAnalyzerFastaParser,
'enable_asserts': useEnableAsserts,

View File

@ -30,11 +30,8 @@ final _variables = {
"jscl": _Variable.bool((c) => c.runtime.isJSCommandLine),
"minified": _Variable.bool((c) => c.isMinified),
"mode": _Variable((c) => c.mode.name, Mode.names),
"no_preview_dart_2": _Variable.bool((c) => c.noPreviewDart2),
"preview_dart_2": _Variable.bool((c) => !c.noPreviewDart2),
"runtime": _Variable(_runtimeName, _runtimeNames),
"spec_parser": _Variable.bool((c) => c.compiler == Compiler.specParser),
"strong": _Variable.bool((c) => !c.noPreviewDart2),
"system": _Variable(_systemName, _systemNames),
"use_sdk": _Variable.bool((c) => c.useSdk)
};

View File

@ -164,9 +164,6 @@ test options, specifying how tests should be run.''',
'Only run tests that are not marked `Slow` or `Timeout`.'),
_Option.bool('enable_asserts',
'Pass the --enable-asserts flag to dart2js or to the vm.'),
_Option.bool('no_preview_dart_2',
'Enable legacy Dart 1 behavior for some runtimes and compilers.',
hide: true),
_Option.bool('use_cfe', 'Pass the --use-cfe flag to analyzer', hide: true),
_Option.bool('analyzer_use_fasta_parser',
'Pass the --use-fasta-parser flag to analyzer',
@ -380,9 +377,9 @@ compiler.''',
return null;
}
if (arguments.contains("--list-configurations")) {
final testMatrixFile = "tools/bots/test_matrix.json";
TestMatrix testMatrix = TestMatrix.fromPath(testMatrixFile);
for (final configuration in testMatrix.configurations
var testMatrixFile = "tools/bots/test_matrix.json";
var testMatrix = TestMatrix.fromPath(testMatrixFile);
for (var configuration in testMatrix.configurations
.map((configuration) => configuration.name)
.toList()
..sort()) {
@ -390,10 +387,6 @@ compiler.''',
}
return null;
}
// Dart1 mode has been deprecated.
if (arguments.contains("--no-preview-dart-2")) {
return null;
}
var configuration = <String, dynamic>{};
@ -698,8 +691,7 @@ compiler.''',
vmOptions: vmOptions,
dart2jsOptions: dart2jsOptions,
babel: data['babel'] as String,
builderTag: data["builder_tag"] as String,
previewDart2: true);
builderTag: data["builder_tag"] as String);
var configuration = TestConfiguration(
configuration: innerConfiguration,
progress: Progress.find(data["progress"] as String),

View File

@ -257,22 +257,20 @@ abstract class TestSuite {
/// pubspec checkouts ...).
String createOutputDirectory(Path testPath) {
var checked = configuration.isChecked ? '-checked' : '';
var legacy = configuration.noPreviewDart2 ? '-legacy' : '';
var minified = configuration.isMinified ? '-minified' : '';
var sdk = configuration.useSdk ? '-sdk' : '';
var dirName = "${configuration.compiler.name}-${configuration.runtime.name}"
"$checked$legacy$minified$sdk";
"$checked$minified$sdk";
return createGeneratedTestDirectoryHelper("tests", dirName, testPath);
}
String createCompilationOutputDirectory(Path testPath) {
var checked = configuration.isChecked ? '-checked' : '';
var legacy = configuration.noPreviewDart2 ? '-legacy' : '';
var minified = configuration.isMinified ? '-minified' : '';
var csp = configuration.isCsp ? '-csp' : '';
var sdk = configuration.useSdk ? '-sdk' : '';
var dirName = "${configuration.compiler.name}"
"$checked$legacy$minified$csp$sdk";
"$checked$minified$csp$sdk";
return createGeneratedTestDirectoryHelper(
"compilations", dirName, testPath);
}
@ -362,21 +360,18 @@ class VMTestSuite extends TestSuite {
hasStaticWarning: false,
hasCrash: testExpectation == Expectation.crash);
var args = configuration.standardOptions.toList();
if (configuration.compilerConfiguration.previewDart2) {
var filename = configuration.architecture == Architecture.x64
? '$buildDir/gen/kernel-service.dart.snapshot'
: '$buildDir/gen/kernel_service.dill';
var dfePath = Path(filename).absolute.toNativePath();
var filename = configuration.architecture == Architecture.x64
? '$buildDir/gen/kernel-service.dart.snapshot'
: '$buildDir/gen/kernel_service.dill';
var dfePath = Path(filename).absolute.toNativePath();
var args = [
if (expectations.contains(Expectation.crash)) '--suppress-core-dump',
// '--dfe' has to be the first argument for run_vm_test to pick it up.
args.insert(0, '--dfe=$dfePath');
args.addAll(configuration.vmOptions);
}
if (expectations.contains(Expectation.crash)) {
args.insert(0, '--suppress-core-dump');
}
args.add(test.name);
'--dfe=$dfePath',
...configuration.standardOptions,
...configuration.vmOptions,
test.name
];
var command = ProcessCommand(
'run_vm_unittest', targetRunnerPath, args, environmentOverrides);

View File

@ -432,12 +432,10 @@ class TestUtils {
configuration.compiler == Compiler.dartkb ||
configuration.compiler == Compiler.dartkp) {
var checked = configuration.isChecked ? '-checked' : '';
var legacy = configuration.noPreviewDart2 ? '-legacy' : '';
var minified = configuration.isMinified ? '-minified' : '';
var csp = configuration.isCsp ? '-csp' : '';
var sdk = configuration.useSdk ? '-sdk' : '';
var dirName = "${configuration.compiler.name}"
"$checked$legacy$minified$csp$sdk";
var dirName = "${configuration.compiler.name}$checked$minified$csp$sdk";
var generatedPath =
configuration.buildDirectory + "/generated_compilations/$dirName";
if (FileSystemEntity.isDirectorySync(generatedPath)) {

View File

@ -47,12 +47,6 @@ async_scope_test: Pass, Slow
[ $mode == debug && ($arch == simarm || $arch == simarm64) ]
*: SkipSlow
[ !$preview_dart_2 && ($runtime == dart_precompiled || $runtime == vm) ]
*: SkipByDesign # Deprecating all Dart1 modes of execution
[ !$strong && ($compiler == dartk || $compiler == dartkp) ]
*: Skip
# These tests are slow on simulators.
[ $arch == simarm || $arch == simarm64 ]
*: Pass, Slow

View File

@ -72,9 +72,6 @@ cc/GenKernelKernelReadAllBytecode: Skip # Issue 34393.
dart/appjit_bytecode_simple_test: Skip # Issue 34393.
dart/disassemble_determinism_test: Slow # Times out on slower bots.
[ !$strong ]
dart/callee_side_type_checks_test: SkipByDesign
[ $arch == ia32 && $mode == debug && $system == windows ]
dart/transferable_test: Skip # This is performance test and somehow debug win ia32 bot's performance is unpredictable
@ -137,9 +134,6 @@ dart/catch_entry_state: SkipByDesign
[ $runtime == vm && $system == macos && ($compiler == dartk || $compiler == dartkb) ]
cc/IsolateReload_LibraryLookup: Fail, Crash
[ $runtime == vm && !$checked && !$strong ]
dart/redirection_type_shuffling_test/00: MissingCompileTimeError
[ $runtime == vm && ($compiler == dartk || $compiler == dartkb) ]
cc/DartAPI_LoadLibrary: Fail, Crash # Issue 33048.
cc/DebuggerAPI_BreakpointStubPatching: Fail
@ -164,14 +158,6 @@ cc/IsolateReload_LibraryLookup: Fail, Crash
[ $checked && ($compiler == dartk || $compiler == dartkb) ]
dart/redirection_type_shuffling_test/00: Pass # Works in --checked mode but not in --strong mode.
[ $strong && ($compiler == dartk || $compiler == dartkb) ]
cc/DartGeneratedArrayLiteralMessages: Crash # Issue 32190
cc/FullSnapshot1: Crash # Issue 32190
cc/IsolateReload_LibraryLookup: Fail, Crash # Issue 32190
cc/MismatchedSnapshotKinds: Fail, Crash, OK # Script snapshots not supported in Dart 2
cc/ScriptSnapshot1: Fail, Crash, OK # Script snapshots not supported in Dart 2
cc/ScriptSnapshotsUpdateSubclasses: Fail, Crash, OK # Script snapshots not supported in Dart 2
[ ($arch == simarm || $arch == simarm64 || $arch == simdbc || $arch == simdbc64) && ($compiler == dartk || $compiler == dartkb) ]
dart/appjit*: SkipSlow # DFE too slow
@ -250,6 +236,12 @@ dart/data_uri*test: Skip # Data uri's not supported by dart2js or the analyzer.
[ $compiler == dartk || $compiler == dartkb ]
cc/DartAPI_New: Fail # Issue #33041
cc/DartGeneratedArrayLiteralMessages: Crash # Issue 32190
cc/FullSnapshot1: Crash # Issue 32190
cc/IsolateReload_LibraryLookup: Fail, Crash # Issue 32190
cc/MismatchedSnapshotKinds: Fail, Crash, OK # Script snapshots not supported in Dart 2
cc/ScriptSnapshot1: Fail, Crash, OK # Script snapshots not supported in Dart 2
cc/ScriptSnapshotsUpdateSubclasses: Fail, Crash, OK # Script snapshots not supported in Dart 2
dart/redirection_type_shuffling_test/00: RuntimeError, Pass
dart/redirection_type_shuffling_test/none: RuntimeError

View File

@ -17,9 +17,6 @@ sample_extension/test/sample_extension_app_snapshot_test: Pass, RuntimeError # I
[ $compiler == none && $runtime == vm && $system == fuchsia ]
*: Skip # Not yet triaged.
[ !$preview_dart_2 && ($runtime == dart_precompiled || $runtime == vm) ]
*: SkipByDesign # Deprecating all Dart1 modes of execution
[ $arch != x64 || $compiler != dartk || $system != linux || $hot_reload || $hot_reload_rollback ]
ffi/sqlite/test/sqlite_test: Skip # FFI not supported or libsqlite3.so not available.

View File

@ -163,9 +163,6 @@ symbol_reserved_word_test/12: RuntimeError # Issues 11669 and 31936 - throwing c
symbol_test/none: RuntimeError # Issues 11669 and 31936 - throwing const constructors.
unicode_test: RuntimeError # Issue 18061: German double S.
[ !$preview_dart_2 && ($runtime == dart_precompiled || $runtime == vm) ]
*: SkipByDesign # Deprecating all Dart1 modes of execution
[ ($arch == simdbc || $arch == simdbc64) && ($hot_reload || $hot_reload_rollback) ]
uri_parse_test: SkipSlow

View File

@ -8,6 +8,3 @@ unsorted/simple_literal_test/01: Skip # The test expects error for large integer
[ !$fasta ]
unsorted/loop_test: Skip # This test uses optional new/const.
[ !$preview_dart_2 && ($runtime == dart_precompiled || $runtime == vm) ]
*: SkipByDesign # Deprecating all Dart1 modes of execution

View File

@ -72,9 +72,6 @@ function_type/*: Skip # Needs checked mode.
[ $compiler != dartk && $compiler != dartkb && $compiler != dartkp && $mode == debug && $runtime == vm ]
built_in_identifier_type_annotation_test/set: Crash # Not supported by legacy VM front-end.
[ !$preview_dart_2 && ($runtime == dart_precompiled || $runtime == vm) ]
*: SkipByDesign # Deprecating all Dart1 modes of execution
[ $hot_reload || $hot_reload_rollback ]
cha_deopt1_test: Crash # Requires deferred libraries
cha_deopt2_test: Crash # Requires deferred libraries

View File

@ -117,9 +117,6 @@ html/transition_event_test: Skip # Times out. Issue 22167
[ $runtime != dart_precompiled && ($runtime != vm || $compiler != dartk && $compiler != none) ]
isolate/vm_rehash_test: SkipByDesign
[ !$preview_dart_2 && ($runtime == dart_precompiled || $runtime == vm) ]
*: SkipByDesign # Deprecating all Dart1 modes of execution
[ $arch == simarm || $arch == simarmv5te || $arch == simarmv6 ]
convert/utf85_test: Skip # Pass, Slow Issue 12644.

View File

@ -79,9 +79,6 @@ mirrors/invocation_fuzz_test: Crash
mirrors/library_uri_io_test: RuntimeError
mirrors/library_uri_package_test: RuntimeError
[ $runtime == vm && $no_preview_dart_2 ]
async/async_no_await_zones_test: RuntimeError # not supported in Dart 1 mode.
[ $runtime == vm && ($arch == simarm || $arch == simarmv5te || $arch == simarmv6) ]
convert/utf85_test: Skip # Pass, Slow Issue 12644.

View File

@ -94,9 +94,6 @@ io/secure_server_client_certificate_test: Skip # Re-enable once the bots have be
io/socket_connect_stream_data_close_cancel_test: Pass, Timeout # Issue 27453
io/socket_many_connections_test: Skip # This test fails with "Too many open files" on the Mac OS buildbot. This is expected as MacOS by default runs with a very low number of allowed open files ('ulimit -n' says something like 256).
[ !$preview_dart_2 && ($runtime == dart_precompiled || $runtime == vm) ]
*: SkipByDesign # Deprecating all Dart1 modes of execution
[ $arch == arm || $arch == arm64 || $runtime != vm || $mode == debug && $system == windows ]
fragmentation_test: Skip