[ddc] Cleanup some unsound test suites

The first in a series of changes that deletes all DDC tests running
with unsound null safety. Follow up changes will remove more tests
configurations, and null safety mode plumbing for the DDC infra.

* Delete the unsound version of some suites.
* Renames the sound suites to be more descriptive of the code in the
  test instead of the mode it is run in.

Change-Id: If2edfecc811bb78a77a1e93bd6d0b75f22c3e80c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365520
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
This commit is contained in:
Nicholas Shahan 2024-05-06 22:19:20 +00:00 committed by Commit Queue
parent 40655e56f0
commit bc084d0a53
16 changed files with 6 additions and 237 deletions

View file

@ -1,30 +0,0 @@
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:dev_compiler/src/compiler/module_builder.dart'
show ModuleFormat;
import 'package:test/test.dart';
import '../shared_test_options.dart';
import 'expression_compiler_e2e_shared.dart';
import 'expression_compiler_e2e_suite.dart';
void main(List<String> args) async {
var driver = await ExpressionEvaluationTestDriver.init();
group('(Unsound null safety) (Agnostic code shard 1)', () {
tearDownAll(() async {
await driver.finish();
});
group('(AMD module system)', () {
var setup = SetupCompilerOptions(
soundNullSafety: false,
moduleFormat: ModuleFormat.amd,
args: args,
);
runAgnosticSharedTestsShard1(setup, driver);
});
});
}

View file

@ -1,30 +0,0 @@
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:dev_compiler/src/compiler/module_builder.dart'
show ModuleFormat;
import 'package:test/test.dart';
import '../shared_test_options.dart';
import 'expression_compiler_e2e_shared.dart';
import 'expression_compiler_e2e_suite.dart';
void main(List<String> args) async {
var driver = await ExpressionEvaluationTestDriver.init();
group('(Unsound null safety) (Agnostic code shard 2)', () {
tearDownAll(() async {
await driver.finish();
});
group('(AMD module system)', () {
var setup = SetupCompilerOptions(
soundNullSafety: false,
moduleFormat: ModuleFormat.amd,
args: args,
);
runAgnosticSharedTestsShard2(setup, driver);
});
});
}

View file

@ -1,30 +0,0 @@
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:dev_compiler/src/compiler/module_builder.dart'
show ModuleFormat;
import 'package:test/test.dart';
import '../shared_test_options.dart';
import 'expression_compiler_e2e_shared.dart';
import 'expression_compiler_e2e_suite.dart';
void main(List<String> args) async {
var driver = await ExpressionEvaluationTestDriver.init();
group('(Unsound null safety)', () {
tearDownAll(() async {
await driver.finish();
});
group('(AMD module system)', () {
var setup = SetupCompilerOptions(
soundNullSafety: false,
moduleFormat: ModuleFormat.amd,
args: args,
);
runNullSafeSharedTests(setup, driver);
});
});
}

View file

@ -1,30 +0,0 @@
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:dev_compiler/src/compiler/module_builder.dart'
show ModuleFormat;
import 'package:test/test.dart';
import '../shared_test_options.dart';
import 'expression_compiler_e2e_shared.dart';
import 'expression_compiler_e2e_suite.dart';
void main(List<String> args) async {
var driver = await ExpressionEvaluationTestDriver.init();
group('(Unsound null safety) (Agnostic code shard 1)', () {
tearDownAll(() async {
await driver.finish();
});
group('(DDC module system)', () {
var setup = SetupCompilerOptions(
soundNullSafety: false,
moduleFormat: ModuleFormat.ddc,
args: args,
);
runAgnosticSharedTestsShard1(setup, driver);
});
});
}

View file

@ -1,30 +0,0 @@
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:dev_compiler/src/compiler/module_builder.dart'
show ModuleFormat;
import 'package:test/test.dart';
import '../shared_test_options.dart';
import 'expression_compiler_e2e_shared.dart';
import 'expression_compiler_e2e_suite.dart';
void main(List<String> args) async {
var driver = await ExpressionEvaluationTestDriver.init();
group('(Unsound null safety) (Agnostic code shard 2)', () {
tearDownAll(() async {
await driver.finish();
});
group('(DDC module system)', () {
var setup = SetupCompilerOptions(
soundNullSafety: false,
moduleFormat: ModuleFormat.ddc,
args: args,
);
runAgnosticSharedTestsShard2(setup, driver);
});
});
}

View file

@ -1,30 +0,0 @@
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:dev_compiler/src/compiler/module_builder.dart'
show ModuleFormat;
import 'package:test/test.dart';
import '../shared_test_options.dart';
import 'expression_compiler_e2e_shared.dart';
import 'expression_compiler_e2e_suite.dart';
void main(List<String> args) async {
var driver = await ExpressionEvaluationTestDriver.init();
group('(Unsound null safety)', () {
tearDownAll(() async {
await driver.finish();
});
group('(DDC module system)', () {
var setup = SetupCompilerOptions(
soundNullSafety: false,
moduleFormat: ModuleFormat.ddc,
args: args,
);
runNullSafeSharedTests(setup, driver);
});
});
}

View file

@ -1,9 +0,0 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'runtime_debugger_api_test.dart' as common_tests;
void main(List<String> args) async {
await common_tests.runAllTests(false, args);
}

View file

@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
/// Test the modular compilation pipeline of ddc without sound null safety.
/// Test the modular compilation pipeline of ddc in canary mode.
///
/// This is a shell that runs multiple tests, one per folder under `data/`.
library;
@ -15,7 +15,7 @@ import 'modular_helpers.dart';
void main(List<String> args) async {
final options = Options.parse(args);
final soundNullSafety = false;
final soundNullSafety = true;
await resolveScripts(options);
await runSuite(
sdkRoot.resolve('tests/modular/'),
@ -24,7 +24,7 @@ void main(List<String> args) async {
IOPipeline([
PrecompileMacroAotStep(verbose: options.verbose),
SourceToSummaryDillStep(soundNullSafety: soundNullSafety),
DDCStep(soundNullSafety: soundNullSafety, canaryFeatures: false),
DDCStep(soundNullSafety: soundNullSafety, canaryFeatures: true),
RunD8(),
], cacheSharedModules: true));
}

View file

@ -1,31 +0,0 @@
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
/// Test the modular compilation pipeline of ddc in canary mode without
/// sound null safety.
///
/// This is a shell that runs multiple tests, one per folder under `data/`.
library;
import 'package:modular_test/src/io_pipeline.dart';
import 'package:modular_test/src/runner.dart';
import 'package:modular_test/src/steps/macro_precompile_aot.dart';
import 'modular_helpers.dart';
void main(List<String> args) async {
final options = Options.parse(args);
final soundNullSafety = false;
await resolveScripts(options);
await runSuite(
sdkRoot.resolve('tests/modular/'),
'tests/modular',
options,
IOPipeline([
PrecompileMacroAotStep(verbose: options.verbose),
SourceToSummaryDillStep(soundNullSafety: soundNullSafety),
DDCStep(soundNullSafety: soundNullSafety, canaryFeatures: true),
RunD8(),
], cacheSharedModules: true));
}

View file

@ -1941,17 +1941,6 @@
],
"shards": 12,
"fileset": "js_platform"
},
{
"name": "ddc modular tests unsound",
"script": "out/ReleaseX64/dart-sdk/bin/dart",
"testRunner": true,
"arguments": [
"pkg/dev_compiler/test/modular_suite_unsound.dart",
"-nddc-linux-chrome-unsound",
"--verbose",
"--use-sdk"
]
}
]
},
@ -2015,12 +2004,12 @@
"fileset": "js_platform"
},
{
"name": "ddc modular tests unsound",
"name": "ddc modular tests",
"script": "out/ReleaseX64/dart-sdk/bin/dart",
"testRunner": true,
"arguments": [
"pkg/dev_compiler/test/modular_suite_canary_unsound.dart",
"-nddc-canary-linux-chrome-unsound",
"pkg/dev_compiler/test/modular_suite_canary.dart",
"-nddc-canary-linux-chrome",
"--verbose",
"--use-sdk"
]