[test_runner] Add new name for ddc compiler

* The new compiler name "ddc" will be used for all configurations
  in an upcoming change.
* Aliases "dartdevc" and "dartdevk" will be removed in the future.

Change-Id: I2fa48e0ec043b1ba7fb70f883b39e40f338b6928
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280862
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
This commit is contained in:
Nicholas Shahan
2023-02-09 18:32:58 +00:00
committed by Commit Queue
parent 872a6a4caa
commit 87d1806055
24 changed files with 67 additions and 55 deletions
+2 -1
View File
@@ -26,7 +26,8 @@ bool get isDart2WasmConfiguration =>
bool get isDdcConfiguration =>
_configuration.compiler == Compiler.dartdevk ||
_configuration.compiler == Compiler.dartdevc;
_configuration.compiler == Compiler.dartdevc ||
_configuration.compiler == Compiler.ddc;
bool get isVmJitConfiguration => _configuration.compiler == Compiler.dartk;
+5
View File
@@ -766,6 +766,7 @@ class Compiler extends NamedEnum {
static const dart2wasm = Compiler._('dart2wasm');
static const dartdevc = Compiler._('dartdevc');
static const dartdevk = Compiler._('dartdevk');
static const ddc = Compiler._('ddc');
static const appJitk = Compiler._('app_jitk');
static const dartk = Compiler._('dartk');
static const dartkp = Compiler._('dartkp');
@@ -780,6 +781,7 @@ class Compiler extends NamedEnum {
dart2wasm,
dartdevc,
dartdevk,
ddc,
appJitk,
dartk,
dartkp,
@@ -820,6 +822,7 @@ class Compiler extends NamedEnum {
case Compiler.dartdevc:
case Compiler.dartdevk:
case Compiler.ddc:
return const [
Runtime.none,
Runtime.d8,
@@ -861,6 +864,7 @@ class Compiler extends NamedEnum {
return Runtime.d8;
case Compiler.dartdevc:
case Compiler.dartdevk:
case Compiler.ddc:
return Runtime.chrome;
case Compiler.dart2analyzer:
return Runtime.none;
@@ -884,6 +888,7 @@ class Compiler extends NamedEnum {
case Compiler.dart2wasm:
case Compiler.dartdevc:
case Compiler.dartdevk:
case Compiler.ddc:
case Compiler.fasta:
return Mode.release;
+7 -7
View File
@@ -354,8 +354,8 @@ void main() {
});
group("visualCompare()", () {
var a = Configuration("dartdevc", Architecture.ia32, Compiler.dartdevc,
Mode.debug, Runtime.chrome, System.android,
var a = Configuration("ddc", Architecture.ia32, Compiler.ddc, Mode.debug,
Runtime.chrome, System.android,
builderTag: "a tag",
vmOptions: ["vm a1", "vm a2"],
dart2jsOptions: ["dart2js a1", "dart2js a2"],
@@ -392,10 +392,10 @@ void main() {
test("everything different", () {
expect(a.visualCompare(b), equals("""
dartdevc
ddc
dart2js
architecture: ia32 x64
compiler: dartdevc dart2js
compiler: ddc dart2js
mode: debug release
runtime: chrome d8
system: android fuchsia
@@ -423,10 +423,10 @@ architecture: ia32 x64
test("everything the same", () {
expect(a.visualCompare(a), equals("""
dartdevc
dartdevc
ddc
ddc
architecture: ia32 ia32
compiler: dartdevc dartdevc
compiler: ddc ddc
mode: debug debug
runtime: chrome chrome
system: android android
+3 -3
View File
@@ -129,18 +129,18 @@ bool _invalidVariableName(String keyword, {bool strictMode = true}) {
return false;
}
/// Generates the HTML template file needed to load and run a dartdevc test in
/// Generates the HTML template file needed to load and run a ddc test in
/// the browser.
///
/// [testName] is the short name of the test without any subdirectory path
/// or extension, like "math_test". [testNameAlias] is the alias of the
/// test variable used for import/export (usually relative to its module root).
/// [testJSDir] is the relative path to the build directory where the
/// dartdevc-generated JS file is stored. [nonNullAsserts] enables non-null
/// ddc-generated JS file is stored. [nonNullAsserts] enables non-null
/// assertions for non-nullable method parameters when running with weak null
/// safety. [weakNullSafetyErrors] enables null safety type violations to throw
/// when running in weak mode.
String dartdevcHtml(
String ddcHtml(
String testName,
String testNameAlias,
String testJSDir,
@@ -84,6 +84,7 @@ List<String> _selectBuildTargets(Configuration inner) {
Compiler.appJitk: ['runtime'],
Compiler.fasta: ['create_sdk', 'dartdevc_test', 'kernel_platform_files'],
Compiler.dartdevk: ['dartdevc_test'],
Compiler.ddc: ['dartdevc_test'],
Compiler.dart2js: ['create_sdk'],
Compiler.dart2analyzer: ['create_sdk', 'utils/dartanalyzer'],
Compiler.specParser: <String>[],
@@ -109,7 +110,8 @@ List<String> _selectBuildTargets(Configuration inner) {
result.add('analyze_snapshot');
}
if (compiler == Compiler.dartdevk && !inner.useSdk) {
if ((compiler == Compiler.dartdevk || compiler == Compiler.ddc) &&
!inner.useSdk) {
result
..remove('dartdevc_test')
..add('dartdevc_test_local');
@@ -1640,6 +1640,7 @@ mixin _StaticErrorOutput on CommandOutput {
Compiler.dart2wasm: ErrorSource.web,
Compiler.dartdevc: ErrorSource.web,
Compiler.dartdevk: ErrorSource.web,
Compiler.ddc: ErrorSource.web,
Compiler.fasta: ErrorSource.cfe
}[testCase.configuration.compiler]!;
@@ -87,9 +87,8 @@ abstract class CompilerConfiguration {
return Dart2WasmCompilerConfiguration(configuration);
case Compiler.dartdevc:
return DevCompilerConfiguration(configuration);
case Compiler.dartdevk:
case Compiler.ddc:
return DevCompilerConfiguration(configuration);
case Compiler.appJitk:
@@ -586,16 +585,17 @@ class Dart2WasmCompilerConfiguration extends CompilerConfiguration {
}
}
/// Configuration for `dartdevc` and `dartdevk` (DDC with Kernel)
/// Configuration for "dartdevc", "dartdevk", and "ddc".
// TODO(nshahan): Cleanup mulitple aliases for the compiler.
class DevCompilerConfiguration extends CompilerConfiguration {
DevCompilerConfiguration(TestConfiguration configuration)
: super._subclass(configuration);
String computeCompilerPath() {
// The compiler is a Dart program and not an executable itself, so the
// command to spawn as a subprocess is a Dart VM. Internally the
// [DevCompilerCompilationCommand] will prepend the snapshot or Dart library
// entrypoint that is executed by the VM.
// DDC is a Dart program and not an executable itself, so the command to
// spawn as a subprocess is a Dart VM.
// Internally the [DevCompilerCompilationCommand] will prepend the snapshot
// or Dart library entrypoint that is executed by the VM.
// This will change once we update the DDC to use AOT instead of a snapshot.
var dir = _useSdk ? '${_configuration.buildDirectory}/dart-sdk' : 'sdk';
return '$dir/bin/dart$executableExtension';
@@ -197,6 +197,7 @@ class TestConfiguration {
Compiler.appJitk,
Compiler.dartdevc,
Compiler.dartdevk,
Compiler.ddc,
Compiler.dartk,
Compiler.dartkp,
Compiler.fasta,
+3 -2
View File
@@ -76,8 +76,9 @@ class OptionsParser {
dart2js: Compile to JavaScript using dart2js.
dart2analyzer: Perform static analysis on Dart code using the analyzer.
compare_analyzer_cfe: Compare analyzer and common front end representations.
dartdevc: Compile to JavaScript using dartdevc.
dartdevk: Compile to JavaScript using dartdevc (same as dartdevc).
ddc: Compile to JavaScript using dartdevc.
dartdevc: Compile to JavaScript using dartdevc (same as ddc).
dartdevk: Compile to JavaScript using dartdevc (same as ddc).
app_jitk: Compile the Dart code into Kernel and then into an app
snapshot.
dartk: Compile the Dart code into Kernel before running test.
@@ -571,6 +571,7 @@ class CommandExecutorImpl implements CommandExecutor {
(command.displayName == 'dart2js' ||
command.displayName == 'dartdevc' ||
command.displayName == 'dartdevk' ||
command.displayName == 'ddc' ||
command.displayName == 'fasta') &&
globalConfiguration.batch) {
return _getBatchRunner(command.displayName)
+4 -2
View File
@@ -177,6 +177,7 @@ abstract class TestSuite {
Compiler.dart2js,
Compiler.dartdevc,
Compiler.dartdevk,
Compiler.ddc,
}.contains(configuration.compiler)) {
return true;
}
@@ -946,7 +947,7 @@ class StandardTestSuite extends TestSuite {
testFile.sharedOptions.contains('--null-assertions');
var weakNullSafetyErrors =
testFile.ddcOptions.contains('--weak-null-safety-errors');
content = dartdevcHtml(
content = ddcHtml(
nameNoExt,
nameFromModuleRootNoExt,
jsDir,
@@ -967,7 +968,8 @@ class StandardTestSuite extends TestSuite {
Compiler.dart2js,
Compiler.dart2wasm,
Compiler.dartdevc,
Compiler.dartdevk
Compiler.dartdevk,
Compiler.ddc
};
assert(supportedCompilers.contains(configuration.compiler));
+1 -1
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.
[ $compiler == dartdevc || $compiler == dartdevk ]
[ $compiler == dartdevc || $compiler == dartdevk || $compiler == ddc ]
Language/Expressions/Constants/integer_size_t03: SkipByDesign # uses integer literal not representable as JavaScript number
Language/Expressions/Constants/integer_size_t04: SkipByDesign # uses integer literal not representable as JavaScript number
Language/Expressions/Constants/literal_number_t01: SkipByDesign # uses integer literal not representable as JavaScript number
+1 -1
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.
[ $compiler == dartdevc || $compiler == dartdevk ]
[ $compiler == dartdevc || $compiler == dartdevk || $compiler == ddc ]
Language/Classes/Constructors/Generative_Constructors/formal_parameter_t07: SkipSlow
Language/Classes/Constructors/Generative_Constructors/fresh_instance_t01: SkipSlow
Language/Classes/Constructors/Generative_Constructors/implicit_superinitializer_t01: SkipSlow
+3 -3
View File
@@ -26,7 +26,7 @@ dynamic_nosuchmethod_test: SkipByDesign # Expects names in NSM
error_stack_trace1_test: SkipByDesign # Expects unobfuscated stack trace
type_tostring_test: SkipByDesign # Expects names in Type.toString()
[ $compiler != dart2analyzer && $compiler != dart2js && $compiler != dartdevc && $compiler != dartdevk ]
[ $compiler != dart2analyzer && $compiler != dart2js && $compiler != dartdevc && $compiler != dartdevk && $compiler != ddc ]
bigint_js_test: SkipByDesign # JavaScript-specific test
[ $compiler == dart2js && $runtime != none ]
@@ -35,7 +35,7 @@ regexp/pcre_test: Slow, Pass # Issue 21593
[ $runtime != dart_precompiled && $runtime != vm ]
reg_exp_receive_port_test: SkipByDesign # uses SendPort/ReceivePort
[ $runtime != none && ($compiler == dart2js || $compiler == dartdevc || $compiler == dartdevk) ]
[ $runtime != none && ($compiler == dart2js || $compiler == dartdevc || $compiler == dartdevk || $compiler == ddc) ]
int_parse_with_limited_ints_test: SkipByDesign # Requires fixed-size int64 support.
integer_arith_vm_test: SkipByDesign # Is a VM optimization test that requires int64 support.
iterable_return_type_int64_test: SkipByDesign # Requires int64 support.
@@ -45,7 +45,7 @@ typed_data_with_limited_ints_test: SkipByDesign # Requires fixed-size int64 supp
bigint_parse_radix_test: Skip # Issue 31659
bigint_test: Skip # Issue 31659
[ $compiler == dartdevc || $compiler == dartdevk ]
[ $compiler == dartdevc || $compiler == dartdevk || $compiler == ddc ]
bigint_test/03: SkipSlow # modPow is very slow
bigint_test/15: SkipSlow # modPow is very slow
list_concurrent_modify_self_test: SkipSlow # missing check causes list to grow to whole heap
+4 -6
View File
@@ -5,9 +5,6 @@
bigint_parse_radix_test/3: Slow # Issue http://dartbug.com/47050
bigint_test: Pass, Slow
[ $compiler == dartdevk ]
regexp/lookbehind_test/01: Skip # Flaky in uncatchable way. Issue 36280
[ $compiler == dartkp ]
bigint_parse_radix_test: Slow, Pass # --no_intrinsify
bigint_test/03: SkipSlow # --no_intrinsify
@@ -32,7 +29,7 @@ dynamic_nosuchmethod_test: SkipByDesign # Expects names in NSM
error_stack_trace1_test: SkipByDesign # Expects unobfuscated stack trace
type_tostring_test: SkipByDesign # Expects names in Type.toString()
[ $compiler != dart2analyzer && $compiler != dart2js && $compiler != dartdevc && $compiler != dartdevk ]
[ $compiler != dart2analyzer && $compiler != dart2js && $compiler != dartdevc && $compiler != dartdevk && $compiler != ddc ]
bigint_js_test: SkipByDesign # JavaScript-specific test
[ $compiler == dart2js && $runtime != none ]
@@ -41,7 +38,7 @@ regexp/pcre_test: Slow, Pass # Issue 21593
[ $runtime != dart_precompiled && $runtime != vm ]
reg_exp_receive_port_test: SkipByDesign # uses SendPort/ReceivePort
[ $runtime != none && ($compiler == dart2js || $compiler == dartdevc || $compiler == dartdevk) ]
[ $runtime != none && ($compiler == dart2js || $compiler == dartdevc || $compiler == dartdevk || $compiler == ddc) ]
int_parse_with_limited_ints_test: SkipByDesign # Requires fixed-size int64 support.
integer_arith_vm_test: SkipByDesign # Is a VM optimization test that requires int64 support.
iterable_return_type_int64_test: SkipByDesign # Requires int64 support.
@@ -51,10 +48,11 @@ typed_data_with_limited_ints_test: SkipByDesign # Requires fixed-size int64 supp
bigint_parse_radix_test: Skip # Issue 31659
bigint_test: Skip # Issue 31659
[ $compiler == dartdevc || $compiler == dartdevk ]
[ $compiler == dartdevc || $compiler == dartdevk || $compiler == ddc ]
bigint_test/03: SkipSlow # modPow is very slow
bigint_test/15: SkipSlow # modPow is very slow
list_concurrent_modify_self_test: SkipSlow # missing check causes list to grow to whole heap
regexp/lookbehind_test/01: Skip # Flaky in uncatchable way. Issue 36280
uri_parse_test: Slow, Pass
uri_test: Slow, Pass
@@ -2,4 +2,4 @@
# 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.
# Sections in this file should contain "$compiler == dartdevc" or dartdevk.
# Sections in this file should contain "$compiler == dartdevc", dartdevk or ddc.
+2 -2
View File
@@ -2,9 +2,9 @@
# 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.
# Sections in this file should contain "$compiler == dartdevc" or dartdevk.
# Sections in this file should contain "$compiler == dartdevc", dartdevk or ddc.
[ $compiler == dartdevc || $compiler == dartdevk ]
[ $compiler == dartdevc || $compiler == dartdevk || $compiler == ddc ]
async_star/throw_in_catch_test: Skip # Times out. Issue 29920
external_abstract_fields/external_fields_test: SkipByDesign # Non-JS-interop external members are not supported
number/int64_literal_runtime*_test: Skip # This is testing Dart 2.0 int64 semantics.
+3 -3
View File
@@ -2,12 +2,12 @@
# 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.
# Sections in this file should contain "$compiler == dartdevc" or dartdevk.
# Sections in this file should contain "$compiler == dartdevc", dartdevk or ddc.
[ ($compiler == dartdevc || $compiler == dartdevk) && ($runtime == ff || $runtime == firefox) ]
[ ($compiler == dartdevc || $compiler == dartdevk || $compiler == ddc) && ($runtime == ff || $runtime == firefox) ]
async/return_throw_test: Skip # Flaky but not enough to be detected. Re-enable pending a decision on the correct behavior. https://github.com/dart-lang/sdk/issues/44395
[ $compiler == dartdevc || $compiler == dartdevk ]
[ $compiler == dartdevc || $compiler == dartdevk || $compiler == ddc ]
async_star/throw_in_catch_test: Skip # Times out. Issue 29920
external_abstract_fields/external_fields_test: SkipByDesign # Non-JS-interop external members are not supported
number/int64_literal_runtime*_test: Skip # This is testing Dart 2.0 int64 semantics.
+1 -1
View File
@@ -78,7 +78,7 @@ js/static_interop_test/inline_class/external_static_member_with_namespaces_test:
js/static_interop_test/jsobject_type_test: SkipByDesign # Issue 42085. CSP policy disallows injected JS code
js/trust_types_test: SkipByDesign # Issue 42085. CSP policy disallows injected JS code
[ $compiler != dart2js && $compiler != dartdevc && $compiler != dartdevk ]
[ $compiler != dart2js && $compiler != dartdevc && $compiler != dartdevk && $compiler != ddc ]
web/*: SkipByDesign
[ $runtime == chrome && $system == macos ]
+6 -6
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.
[ $builder_tag == canary && ($compiler == dartdevc || $compiler == dartdevk) ]
[ $builder_tag == canary && ($compiler == dartdevc || $compiler == dartdevk || $compiler == ddc) ]
async/catch_errors11_test: Skip # Issue 50666
async/catch_errors12_test: Skip # Issue 50666
async/catch_errors15_test: Skip # Issue 50666
@@ -19,19 +19,19 @@ async/catch_errors8_test: Skip # Issue 50666
async/stream_iterator_test: Skip # Issue 50666
async/stream_zones_test: Skip # Issue 50666
[ $runtime == chrome && ($compiler == dartdevc || $compiler == dartdevk) ]
[ $runtime == chrome && ($compiler == dartdevc || $compiler == dartdevk || $compiler == ddc) ]
html/js_dispatch_property_test: Skip # Timeout Issue 31030
[ $system == linux && ($compiler == dartdevc || $compiler == dartdevk) ]
[ $system == linux && ($compiler == dartdevc || $compiler == dartdevk || $compiler == ddc) ]
html/interactive_geolocation_test: Skip # Requires allowing geo location.
[ $system == macos && ($compiler == dartdevc || $compiler == dartdevk) ]
[ $system == macos && ($compiler == dartdevc || $compiler == dartdevk || $compiler == ddc) ]
html/interactive_media_test: Skip # Requires interactive camera, microphone permissions.
[ $system == windows && ($compiler == dartdevc || $compiler == dartdevk) ]
[ $system == windows && ($compiler == dartdevc || $compiler == dartdevk || $compiler == ddc) ]
html/xhr_test: Skip # Times out. Issue 21527
[ $compiler == dartdevc || $compiler == dartdevk ]
[ $compiler == dartdevc || $compiler == dartdevk || $compiler == ddc ]
convert/chunked_conversion_utf88_test: Slow, Pass
convert/json_utf8_chunk_test: Slow, Pass
convert/streamed_conversion_utf8_decode_test: Slow, Pass # Issue 29922
+1 -1
View File
@@ -68,7 +68,7 @@ js/static_interop_test/external_static_member_lowerings_trusttypes_test: SkipByD
js/static_interop_test/external_static_member_lowerings_with_namespaces_test: SkipByDesign # Issue 42085. CSP policy disallows injected JS code
js/trust_types_test: SkipByDesign # Issue 42085. CSP policy disallows injected JS code
[ $compiler != dart2js && $compiler != dartdevc && $compiler != dartdevk ]
[ $compiler != dart2js && $compiler != dartdevc && $compiler != dartdevk && $compiler != ddc ]
web/*: SkipByDesign
[ $runtime == chrome && $system == macos ]
+5 -5
View File
@@ -2,19 +2,19 @@
# 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.
[ $runtime == chrome && ($compiler == dartdevc || $compiler == dartdevk) ]
[ $runtime == chrome && ($compiler == dartdevc || $compiler == dartdevk || $compiler == ddc) ]
html/js_dispatch_property_test: Skip # Timeout Issue 31030
[ $system == linux && ($compiler == dartdevc || $compiler == dartdevk) ]
[ $system == linux && ($compiler == dartdevc || $compiler == dartdevk || $compiler == ddc) ]
html/interactive_geolocation_test: Skip # Requires allowing geo location.
[ $system == macos && ($compiler == dartdevc || $compiler == dartdevk) ]
[ $system == macos && ($compiler == dartdevc || $compiler == dartdevk || $compiler == ddc) ]
html/interactive_media_test: Skip # Requires interactive camera, microphone permissions.
[ $system == windows && ($compiler == dartdevc || $compiler == dartdevk) ]
[ $system == windows && ($compiler == dartdevc || $compiler == dartdevk || $compiler == ddc) ]
html/xhr_test: Skip # Times out. Issue 21527
[ $compiler == dartdevc || $compiler == dartdevk ]
[ $compiler == dartdevc || $compiler == dartdevk || $compiler == ddc ]
convert/chunked_conversion_utf88_test: Slow, Pass
convert/json_utf8_chunk_test: Slow, Pass
convert/streamed_conversion_utf8_decode_test: Slow, Pass # Issue 29922
+1 -1
View File
@@ -102,7 +102,7 @@ fragmentation_typed_data_test: SkipSlow
[ $arch == simarm || $arch == simarm64 || $arch == simarm64c || $arch == simriscv32 || $arch == simriscv64 ]
io/socket_sigpipe_test: SkipByDesign # Test uses ffi
[ $compiler == dart2js || $compiler == dartdevc || $compiler == dartdevk ]
[ $compiler == dart2js || $compiler == dartdevc || $compiler == dartdevk || $compiler == ddc ]
*: SkipByDesign
[ $runtime == dart_precompiled || $runtime == vm ]
+1 -1
View File
@@ -109,7 +109,7 @@ fragmentation_typed_data_test: SkipSlow
[ $arch == simarm || $arch == simarm64 || $arch == simarm64c || $arch == simriscv32 || $arch == simriscv64 ]
io/socket_sigpipe_test: SkipByDesign # Test uses ffi
[ $compiler == dart2js || $compiler == dartdevc || $compiler == dartdevk ]
[ $compiler == dart2js || $compiler == dartdevc || $compiler == dartdevk || $compiler == ddc ]
*: SkipByDesign
[ $runtime == dart_precompiled || $runtime == vm ]