Skip to content

Commit 89ad636

Browse files
munificentcommit-bot@chromium.org
authored andcommitted
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 <[email protected]> Reviewed-by: Mayank Patke <[email protected]> Auto-Submit: Bob Nystrom <[email protected]>
1 parent aa34de3 commit 89ad636

File tree

17 files changed

+25
-116
lines changed

17 files changed

+25
-116
lines changed

pkg/smith/lib/configuration.dart

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@
33
// BSD-style license that can be found in the LICENSE file.
44
import 'dart:io';
55

6-
// TODO(rnystrom): Differences from test.dart's version:
7-
// - Remove special handling for "ff" as firefox.
8-
// - "windows" -> "win".
9-
// - "macos" -> "mac".
10-
// - toString() on enum classes is just name.
11-
// - builderTag and babel default to empty string, not null.
12-
// Need to migrate test.dart to not expect the above before it can use this.
13-
146
// READ ME! If you add a new field to this, make sure to add it to
157
// [parse()], [optionsEqual()], [hashCode], and [toString()]. A good check is to
168
// comment out an existing field and see what breaks. Every error is a place
@@ -257,7 +249,6 @@ class Configuration {
257249
isCsp: boolOption("csp"),
258250
isHostChecked: boolOption("host-checked"),
259251
isMinified: boolOption("minified"),
260-
previewDart2: boolOption("preview-dart-2"),
261252
useAnalyzerCfe: boolOption("use-cfe"),
262253
useAnalyzerFastaParser: boolOption("analyzer-use-fasta-parser"),
263254
useBlobs: boolOption("use-blobs"),
@@ -308,9 +299,6 @@ class Configuration {
308299

309300
final bool isMinified;
310301

311-
// TODO(rnystrom): Remove this when Dart 1.0 is no longer supported.
312-
final bool previewDart2;
313-
314302
// TODO(whesse): Remove these when only fasta front end is in analyzer.
315303
final bool useAnalyzerCfe;
316304
final bool useAnalyzerFastaParser;
@@ -336,7 +324,6 @@ class Configuration {
336324
bool isCsp,
337325
bool isHostChecked,
338326
bool isMinified,
339-
bool previewDart2,
340327
bool useAnalyzerCfe,
341328
bool useAnalyzerFastaParser,
342329
bool useBlobs,
@@ -354,7 +341,6 @@ class Configuration {
354341
isCsp = isCsp ?? false,
355342
isHostChecked = isHostChecked ?? false,
356343
isMinified = isMinified ?? false,
357-
previewDart2 = previewDart2 ?? true,
358344
useAnalyzerCfe = useAnalyzerCfe ?? false,
359345
useAnalyzerFastaParser = useAnalyzerFastaParser ?? false,
360346
useBlobs = useBlobs ?? false,
@@ -381,7 +367,6 @@ class Configuration {
381367
isCsp == other.isCsp &&
382368
isHostChecked == other.isHostChecked &&
383369
isMinified == other.isMinified &&
384-
previewDart2 == other.previewDart2 &&
385370
useAnalyzerCfe == other.useAnalyzerCfe &&
386371
useAnalyzerFastaParser == other.useAnalyzerFastaParser &&
387372
useBlobs == other.useBlobs &&
@@ -414,7 +399,6 @@ class Configuration {
414399
isCsp,
415400
isHostChecked,
416401
isMinified,
417-
previewDart2,
418402
useAnalyzerCfe,
419403
useAnalyzerFastaParser,
420404
useBlobs,
@@ -448,7 +432,6 @@ class Configuration {
448432
if (isCsp) fields.add("csp");
449433
if (isHostChecked) fields.add("host-checked");
450434
if (isMinified) fields.add("minified");
451-
if (previewDart2) fields.add("preview-dart-2");
452435
if (useAnalyzerCfe) fields.add("use-cfe");
453436
if (useAnalyzerFastaParser) fields.add("analyzer-use-fasta-parser");
454437
if (useBlobs) fields.add("use-blobs");
@@ -509,9 +492,6 @@ class Configuration {
509492
if (isMinified || other.isMinified) {
510493
fields.add("isMinified $isMinified ${other.isMinified}");
511494
}
512-
if (previewDart2 || other.previewDart2) {
513-
fields.add("previewDart2 $previewDart2 ${other.previewDart2}");
514-
}
515495
if (useAnalyzerCfe || other.useAnalyzerCfe) {
516496
fields.add("useAnalyzerCfe $useAnalyzerCfe ${other.useAnalyzerCfe}");
517497
}

pkg/smith/test/configuration_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ void main() {
206206
"csp": true,
207207
"host-checked": true,
208208
"minified": true,
209-
"preview-dart-2": true,
210209
"hot-reload": true,
211210
"hot-reload-rollback": true,
212211
"use-sdk": true,
@@ -226,7 +225,6 @@ void main() {
226225
isCsp: true,
227226
isHostChecked: true,
228227
isMinified: true,
229-
previewDart2: true,
230228
useHotReload: true,
231229
useHotReloadRollback: true,
232230
useSdk: true,

pkg/test_runner/lib/src/compiler_configuration.dart

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ abstract class CompilerConfiguration {
4444

4545
bool get _useEnableAsserts => _configuration.useEnableAsserts;
4646

47-
bool get previewDart2 => !_configuration.noPreviewDart2;
48-
4947
/// Whether to run the runtime on the compilation result of a test which
5048
/// expects a compile-time error and the compiler did not emit one.
5149
bool get runRuntimeDespiteMissingCompileTimeError => false;
@@ -941,10 +939,6 @@ class AnalyzerCompilerConfiguration extends CompilerConfiguration {
941939

942940
CommandArtifact computeCompilationArtifact(String tempDir,
943941
List<String> arguments, Map<String, String> environmentOverrides) {
944-
if (!previewDart2) {
945-
throw ArgumentError('--no-preview-dart-2 not supported');
946-
}
947-
948942
var args = [
949943
...arguments,
950944
if (_configuration.useAnalyzerCfe) '--use-cfe',
@@ -985,10 +979,6 @@ class CompareAnalyzerCfeCompilerConfiguration extends CompilerConfiguration {
985979

986980
CommandArtifact computeCompilationArtifact(String tempDir,
987981
List<String> arguments, Map<String, String> environmentOverrides) {
988-
if (!previewDart2) {
989-
throw ArgumentError('--no-preview-dart-2 not supported');
990-
}
991-
992982
// Since this is not a real compilation, no artifacts are produced.
993983
return CommandArtifact([
994984
CompareAnalyzerCfeCommand(
@@ -1113,8 +1103,6 @@ class FastaCompilerConfiguration extends CompilerConfiguration {
11131103

11141104
final Uri _vmExecutable;
11151105

1116-
bool get _isLegacy => _configuration.noPreviewDart2;
1117-
11181106
factory FastaCompilerConfiguration(TestConfiguration configuration) {
11191107
var buildDirectory =
11201108
Uri.base.resolveUri(Uri.directory(configuration.buildDirectory));
@@ -1124,8 +1112,7 @@ class FastaCompilerConfiguration extends CompilerConfiguration {
11241112
dillDir = buildDirectory.resolve("dart-sdk/lib/_internal/");
11251113
}
11261114

1127-
var suffix = !configuration.noPreviewDart2 ? "_strong" : "";
1128-
var platformDill = dillDir.resolve("vm_platform$suffix.dill");
1115+
var platformDill = dillDir.resolve("vm_platform_strong.dill");
11291116

11301117
var vmExecutable = buildDirectory
11311118
.resolve(configuration.useSdk ? "dart-sdk/bin/dart" : "dart");
@@ -1152,7 +1139,6 @@ class FastaCompilerConfiguration extends CompilerConfiguration {
11521139

11531140
var compilerArguments = [
11541141
'--verify',
1155-
if (_isLegacy) "--legacy-mode",
11561142
"-o",
11571143
outputFileName,
11581144
"--platform",

pkg/test_runner/lib/src/configuration.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ class TestConfiguration {
112112
bool get isHostChecked => configuration.isHostChecked;
113113
bool get isCsp => configuration.isCsp;
114114
bool get isMinified => configuration.isMinified;
115-
bool get noPreviewDart2 => !configuration.previewDart2;
116115
bool get useAnalyzerCfe => configuration.useAnalyzerCfe;
117116
bool get useAnalyzerFastaParser => configuration.useAnalyzerFastaParser;
118117
bool get useBlobs => configuration.useBlobs;
@@ -461,7 +460,6 @@ class TestConfiguration {
461460
'use_sdk': useSdk,
462461
'builder_tag': builderTag,
463462
'timeout': timeout,
464-
'no_preview_dart_2': noPreviewDart2,
465463
'use_cfe': useAnalyzerCfe,
466464
'analyzer_use_fasta_parser': useAnalyzerFastaParser,
467465
'enable_asserts': useEnableAsserts,

pkg/test_runner/lib/src/environment.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,8 @@ final _variables = {
3030
"jscl": _Variable.bool((c) => c.runtime.isJSCommandLine),
3131
"minified": _Variable.bool((c) => c.isMinified),
3232
"mode": _Variable((c) => c.mode.name, Mode.names),
33-
"no_preview_dart_2": _Variable.bool((c) => c.noPreviewDart2),
34-
"preview_dart_2": _Variable.bool((c) => !c.noPreviewDart2),
3533
"runtime": _Variable(_runtimeName, _runtimeNames),
3634
"spec_parser": _Variable.bool((c) => c.compiler == Compiler.specParser),
37-
"strong": _Variable.bool((c) => !c.noPreviewDart2),
3835
"system": _Variable(_systemName, _systemNames),
3936
"use_sdk": _Variable.bool((c) => c.useSdk)
4037
};

pkg/test_runner/lib/src/options.dart

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,6 @@ test options, specifying how tests should be run.''',
164164
'Only run tests that are not marked `Slow` or `Timeout`.'),
165165
_Option.bool('enable_asserts',
166166
'Pass the --enable-asserts flag to dart2js or to the vm.'),
167-
_Option.bool('no_preview_dart_2',
168-
'Enable legacy Dart 1 behavior for some runtimes and compilers.',
169-
hide: true),
170167
_Option.bool('use_cfe', 'Pass the --use-cfe flag to analyzer', hide: true),
171168
_Option.bool('analyzer_use_fasta_parser',
172169
'Pass the --use-fasta-parser flag to analyzer',
@@ -380,20 +377,16 @@ compiler.''',
380377
return null;
381378
}
382379
if (arguments.contains("--list-configurations")) {
383-
final testMatrixFile = "tools/bots/test_matrix.json";
384-
TestMatrix testMatrix = TestMatrix.fromPath(testMatrixFile);
385-
for (final configuration in testMatrix.configurations
380+
var testMatrixFile = "tools/bots/test_matrix.json";
381+
var testMatrix = TestMatrix.fromPath(testMatrixFile);
382+
for (var configuration in testMatrix.configurations
386383
.map((configuration) => configuration.name)
387384
.toList()
388385
..sort()) {
389386
print(configuration);
390387
}
391388
return null;
392389
}
393-
// Dart1 mode has been deprecated.
394-
if (arguments.contains("--no-preview-dart-2")) {
395-
return null;
396-
}
397390

398391
var configuration = <String, dynamic>{};
399392

@@ -698,8 +691,7 @@ compiler.''',
698691
vmOptions: vmOptions,
699692
dart2jsOptions: dart2jsOptions,
700693
babel: data['babel'] as String,
701-
builderTag: data["builder_tag"] as String,
702-
previewDart2: true);
694+
builderTag: data["builder_tag"] as String);
703695
var configuration = TestConfiguration(
704696
configuration: innerConfiguration,
705697
progress: Progress.find(data["progress"] as String),

pkg/test_runner/lib/src/test_suite.dart

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -257,22 +257,20 @@ abstract class TestSuite {
257257
/// pubspec checkouts ...).
258258
String createOutputDirectory(Path testPath) {
259259
var checked = configuration.isChecked ? '-checked' : '';
260-
var legacy = configuration.noPreviewDart2 ? '-legacy' : '';
261260
var minified = configuration.isMinified ? '-minified' : '';
262261
var sdk = configuration.useSdk ? '-sdk' : '';
263262
var dirName = "${configuration.compiler.name}-${configuration.runtime.name}"
264-
"$checked$legacy$minified$sdk";
263+
"$checked$minified$sdk";
265264
return createGeneratedTestDirectoryHelper("tests", dirName, testPath);
266265
}
267266

268267
String createCompilationOutputDirectory(Path testPath) {
269268
var checked = configuration.isChecked ? '-checked' : '';
270-
var legacy = configuration.noPreviewDart2 ? '-legacy' : '';
271269
var minified = configuration.isMinified ? '-minified' : '';
272270
var csp = configuration.isCsp ? '-csp' : '';
273271
var sdk = configuration.useSdk ? '-sdk' : '';
274272
var dirName = "${configuration.compiler.name}"
275-
"$checked$legacy$minified$csp$sdk";
273+
"$checked$minified$csp$sdk";
276274
return createGeneratedTestDirectoryHelper(
277275
"compilations", dirName, testPath);
278276
}
@@ -362,21 +360,18 @@ class VMTestSuite extends TestSuite {
362360
hasStaticWarning: false,
363361
hasCrash: testExpectation == Expectation.crash);
364362

365-
var args = configuration.standardOptions.toList();
366-
if (configuration.compilerConfiguration.previewDart2) {
367-
var filename = configuration.architecture == Architecture.x64
368-
? '$buildDir/gen/kernel-service.dart.snapshot'
369-
: '$buildDir/gen/kernel_service.dill';
370-
var dfePath = Path(filename).absolute.toNativePath();
363+
var filename = configuration.architecture == Architecture.x64
364+
? '$buildDir/gen/kernel-service.dart.snapshot'
365+
: '$buildDir/gen/kernel_service.dill';
366+
var dfePath = Path(filename).absolute.toNativePath();
367+
var args = [
368+
if (expectations.contains(Expectation.crash)) '--suppress-core-dump',
371369
// '--dfe' has to be the first argument for run_vm_test to pick it up.
372-
args.insert(0, '--dfe=$dfePath');
373-
args.addAll(configuration.vmOptions);
374-
}
375-
if (expectations.contains(Expectation.crash)) {
376-
args.insert(0, '--suppress-core-dump');
377-
}
378-
379-
args.add(test.name);
370+
'--dfe=$dfePath',
371+
...configuration.standardOptions,
372+
...configuration.vmOptions,
373+
test.name
374+
];
380375

381376
var command = ProcessCommand(
382377
'run_vm_unittest', targetRunnerPath, args, environmentOverrides);

pkg/test_runner/lib/src/utils.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,12 +432,10 @@ class TestUtils {
432432
configuration.compiler == Compiler.dartkb ||
433433
configuration.compiler == Compiler.dartkp) {
434434
var checked = configuration.isChecked ? '-checked' : '';
435-
var legacy = configuration.noPreviewDart2 ? '-legacy' : '';
436435
var minified = configuration.isMinified ? '-minified' : '';
437436
var csp = configuration.isCsp ? '-csp' : '';
438437
var sdk = configuration.useSdk ? '-sdk' : '';
439-
var dirName = "${configuration.compiler.name}"
440-
"$checked$legacy$minified$csp$sdk";
438+
var dirName = "${configuration.compiler.name}$checked$minified$csp$sdk";
441439
var generatedPath =
442440
configuration.buildDirectory + "/generated_compilations/$dirName";
443441
if (FileSystemEntity.isDirectorySync(generatedPath)) {

runtime/observatory/tests/service/service.status

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,6 @@ async_scope_test: Pass, Slow
4747
[ $mode == debug && ($arch == simarm || $arch == simarm64) ]
4848
*: SkipSlow
4949

50-
[ !$preview_dart_2 && ($runtime == dart_precompiled || $runtime == vm) ]
51-
*: SkipByDesign # Deprecating all Dart1 modes of execution
52-
53-
[ !$strong && ($compiler == dartk || $compiler == dartkp) ]
54-
*: Skip
55-
5650
# These tests are slow on simulators.
5751
[ $arch == simarm || $arch == simarm64 ]
5852
*: Pass, Slow

runtime/tests/vm/vm.status

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ cc/GenKernelKernelReadAllBytecode: Skip # Issue 34393.
7272
dart/appjit_bytecode_simple_test: Skip # Issue 34393.
7373
dart/disassemble_determinism_test: Slow # Times out on slower bots.
7474

75-
[ !$strong ]
76-
dart/callee_side_type_checks_test: SkipByDesign
77-
7875
[ $arch == ia32 && $mode == debug && $system == windows ]
7976
dart/transferable_test: Skip # This is performance test and somehow debug win ia32 bot's performance is unpredictable
8077

@@ -137,9 +134,6 @@ dart/catch_entry_state: SkipByDesign
137134
[ $runtime == vm && $system == macos && ($compiler == dartk || $compiler == dartkb) ]
138135
cc/IsolateReload_LibraryLookup: Fail, Crash
139136

140-
[ $runtime == vm && !$checked && !$strong ]
141-
dart/redirection_type_shuffling_test/00: MissingCompileTimeError
142-
143137
[ $runtime == vm && ($compiler == dartk || $compiler == dartkb) ]
144138
cc/DartAPI_LoadLibrary: Fail, Crash # Issue 33048.
145139
cc/DebuggerAPI_BreakpointStubPatching: Fail
@@ -164,14 +158,6 @@ cc/IsolateReload_LibraryLookup: Fail, Crash
164158
[ $checked && ($compiler == dartk || $compiler == dartkb) ]
165159
dart/redirection_type_shuffling_test/00: Pass # Works in --checked mode but not in --strong mode.
166160

167-
[ $strong && ($compiler == dartk || $compiler == dartkb) ]
168-
cc/DartGeneratedArrayLiteralMessages: Crash # Issue 32190
169-
cc/FullSnapshot1: Crash # Issue 32190
170-
cc/IsolateReload_LibraryLookup: Fail, Crash # Issue 32190
171-
cc/MismatchedSnapshotKinds: Fail, Crash, OK # Script snapshots not supported in Dart 2
172-
cc/ScriptSnapshot1: Fail, Crash, OK # Script snapshots not supported in Dart 2
173-
cc/ScriptSnapshotsUpdateSubclasses: Fail, Crash, OK # Script snapshots not supported in Dart 2
174-
175161
[ ($arch == simarm || $arch == simarm64 || $arch == simdbc || $arch == simdbc64) && ($compiler == dartk || $compiler == dartkb) ]
176162
dart/appjit*: SkipSlow # DFE too slow
177163

@@ -250,6 +236,12 @@ dart/data_uri*test: Skip # Data uri's not supported by dart2js or the analyzer.
250236

251237
[ $compiler == dartk || $compiler == dartkb ]
252238
cc/DartAPI_New: Fail # Issue #33041
239+
cc/DartGeneratedArrayLiteralMessages: Crash # Issue 32190
240+
cc/FullSnapshot1: Crash # Issue 32190
241+
cc/IsolateReload_LibraryLookup: Fail, Crash # Issue 32190
242+
cc/MismatchedSnapshotKinds: Fail, Crash, OK # Script snapshots not supported in Dart 2
243+
cc/ScriptSnapshot1: Fail, Crash, OK # Script snapshots not supported in Dart 2
244+
cc/ScriptSnapshotsUpdateSubclasses: Fail, Crash, OK # Script snapshots not supported in Dart 2
253245
dart/redirection_type_shuffling_test/00: RuntimeError, Pass
254246
dart/redirection_type_shuffling_test/none: RuntimeError
255247

0 commit comments

Comments
 (0)