Skip to content

Commit 50865e9

Browse files
committed
[vm/testing] Make --strong -c dartk configuration a Dart 2.0 configuration.
Switch it to use pkg/vm/tool/dart2 which is the source of truth for what Dart 2 VM configuration means. Don't pass any additional flags from tools/test.py itself. Align pkg/vm/tool/dart2 with what tools/test.py was passing to VM on _2 suites. Make default invocation `tools/test.py -c dartk --strong -m release,debug` green by updating status files and skipping suites that are not Dart 2.0 compliant. I have filed issues #31588 for isolate suite and #31587 for service suite. Change-Id: I882b28f6a011eabf69c349ff0792b275434e39ff Reviewed-on: https://dart-review.googlesource.com/27820 Commit-Queue: Vyacheslav Egorov <[email protected]> Reviewed-by: Alexander Markov <[email protected]> Reviewed-by: Siva Annamalai <[email protected]> Reviewed-by: Martin Kustermann <[email protected]>
1 parent e01a98d commit 50865e9

File tree

13 files changed

+278
-10
lines changed

13 files changed

+278
-10
lines changed

pkg/vm/tool/dart2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ BIN_DIR="$OUT_DIR$DART_CONFIGURATION"
3434
exec "$BIN_DIR"/dart \
3535
--strong \
3636
--reify-generic-functions \
37+
--limit-ints-to-64-bits \
3738
--dfe="${BIN_DIR}/gen/kernel-service.dart.snapshot" \
3839
--kernel-binaries="${BIN_DIR}" \
3940
"$@"

runtime/observatory/tests/service/service_kernel.status

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,172 @@ vm_restart_test: Crash
3535
isolate_lifecycle_test: Skip # Flaky.
3636
pause_idle_isolate_test: Skip # Flaky
3737

38+
[ $compiler == dartk && $mode == debug && $strong ]
39+
external_service_disappear_test: Crash # Issue 31587
40+
41+
# Issue 31587
42+
[ $compiler == dartk && $strong ]
43+
add_breakpoint_rpc_kernel_test: CompileTimeError
44+
allocations_test: CompileTimeError
45+
async_next_test: CompileTimeError
46+
async_scope_test: CompileTimeError
47+
async_single_step_exception_test: CompileTimeError
48+
async_single_step_into_test: CompileTimeError
49+
async_single_step_out_test: CompileTimeError
50+
async_star_single_step_into_test: CompileTimeError
51+
async_star_step_out_test: CompileTimeError
52+
async_step_out_test: CompileTimeError
53+
auth_token1_test: CompileTimeError
54+
auth_token_test: CompileTimeError
55+
awaiter_async_stack_contents_test: CompileTimeError
56+
bad_web_socket_address_test: CompileTimeError
57+
break_on_activation_test: CompileTimeError
58+
break_on_function_test: CompileTimeError
59+
breakpoint_in_parts_class_test: CompileTimeError
60+
breakpoint_two_args_checked_test: CompileTimeError
61+
caching_test: CompileTimeError
62+
causal_async_stack_contents_test: CompileTimeError
63+
causal_async_stack_presence_test: CompileTimeError
64+
causal_async_star_stack_contents_test: CompileTimeError
65+
causal_async_star_stack_presence_test: CompileTimeError
66+
code_test: CompileTimeError
67+
collect_all_garbage_test: CompileTimeError
68+
command_test: CompileTimeError
69+
contexts_test: CompileTimeError
70+
coverage_leaf_function_test: CompileTimeError
71+
coverage_optimized_function_test: CompileTimeError
72+
crash_dump_test: CompileTimeError
73+
debugger_inspect_test: CompileTimeError
74+
debugger_location_second_test: CompileTimeError
75+
debugger_location_test: CompileTimeError
76+
debugging_inlined_finally_test: CompileTimeError
77+
debugging_test: CompileTimeError
78+
dev_fs_http_put_test: CompileTimeError
79+
dev_fs_http_put_weird_char_test: CompileTimeError
80+
dev_fs_spawn_test: CompileTimeError
81+
dev_fs_test: CompileTimeError
82+
dev_fs_uri_test: CompileTimeError
83+
dev_fs_weird_char_test: CompileTimeError
84+
developer_server_control_test: CompileTimeError
85+
developer_service_get_isolate_id_test: CompileTimeError
86+
dominator_tree_user_test: CompileTimeError
87+
dominator_tree_vm_test: CompileTimeError
88+
echo_test: CompileTimeError
89+
eval_test: CompileTimeError
90+
external_service_asynchronous_invocation_test: CompileTimeError
91+
external_service_disappear_test: CompileTimeError
92+
external_service_notification_invocation_test: CompileTimeError
93+
external_service_registration_test: CompileTimeError
94+
external_service_registration_via_notification_test: CompileTimeError
95+
external_service_synchronous_invocation_test: CompileTimeError
96+
field_script_test: CompileTimeError
97+
file_service_test: CompileTimeError
98+
gc_test: CompileTimeError
99+
get_allocation_profile_rpc_test: CompileTimeError
100+
get_allocation_samples_test: CompileTimeError
101+
get_cpu_profile_timeline_rpc_test: CompileTimeError
102+
get_flag_list_rpc_test: CompileTimeError
103+
get_heap_map_rpc_test: CompileTimeError
104+
get_instances_rpc_test: CompileTimeError
105+
get_isolate_after_async_error_test: CompileTimeError
106+
get_isolate_after_stack_overflow_error_test: CompileTimeError
107+
get_isolate_after_sync_error_test: CompileTimeError
108+
get_isolate_rpc_test: CompileTimeError
109+
get_object_rpc_test: CompileTimeError
110+
get_object_store_rpc_test: CompileTimeError
111+
get_ports_rpc_test: CompileTimeError
112+
get_retained_size_rpc_test: CompileTimeError
113+
get_retaining_path_rpc_test: CompileTimeError
114+
get_source_report_test: CompileTimeError
115+
get_stack_rpc_test: CompileTimeError
116+
get_user_level_retaining_path_rpc_test: CompileTimeError
117+
get_version_rpc_test: CompileTimeError
118+
get_vm_rpc_test: CompileTimeError
119+
get_vm_timeline_rpc_test: CompileTimeError
120+
get_zone_memory_info_rpc_test: CompileTimeError
121+
implicit_getter_setter_test: CompileTimeError
122+
inbound_references_test: CompileTimeError
123+
instance_field_order_rpc_test: CompileTimeError
124+
isolate_lifecycle_test: CompileTimeError
125+
issue_25465_test: CompileTimeError
126+
issue_27238_test: CompileTimeError
127+
issue_27287_test: CompileTimeError
128+
issue_30555_test: CompileTimeError
129+
local_variable_declaration_test: CompileTimeError
130+
logging_test: CompileTimeError
131+
malformed_test: CompileTimeError
132+
metrics_test: CompileTimeError
133+
mirror_references_test: CompileTimeError
134+
mixin_break_test: CompileTimeError
135+
native_metrics_test: CompileTimeError
136+
next_through_assign_call_test: CompileTimeError
137+
next_through_assign_int_test: CompileTimeError
138+
next_through_call_on_field_in_class_test: CompileTimeError
139+
next_through_call_on_field_test: CompileTimeError
140+
next_through_call_on_static_field_in_class_test: CompileTimeError
141+
next_through_catch_test: CompileTimeError
142+
next_through_closure_test: CompileTimeError
143+
next_through_create_list_and_map_test: CompileTimeError
144+
next_through_for_each_loop_test: CompileTimeError
145+
next_through_for_loop_with_break_and_continue_test: CompileTimeError
146+
next_through_function_expression_test: CompileTimeError
147+
next_through_is_and_as_test: CompileTimeError
148+
next_through_multi_catch_test: CompileTimeError
149+
next_through_new_test: CompileTimeError
150+
next_through_operator_bracket_on_super_test: CompileTimeError
151+
next_through_operator_bracket_on_this_test: CompileTimeError
152+
next_through_operator_bracket_test: CompileTimeError
153+
next_through_simple_async_with_returns_test: CompileTimeError
154+
next_through_simple_linear_2_test: CompileTimeError
155+
next_through_simple_linear_test: CompileTimeError
156+
object_graph_stack_reference_test: CompileTimeError
157+
object_graph_user_test: CompileTimeError
158+
object_graph_vm_test: CompileTimeError
159+
observatory_assets_test: CompileTimeError
160+
parameters_in_scope_at_entry_test: CompileTimeError
161+
pause_idle_isolate_test: CompileTimeError
162+
pause_on_exceptions_test: CompileTimeError
163+
pause_on_start_and_exit_test: CompileTimeError
164+
pause_on_start_then_step_test: CompileTimeError
165+
pause_on_unhandled_async_exceptions2_test: CompileTimeError
166+
pause_on_unhandled_async_exceptions_test: CompileTimeError
167+
pause_on_unhandled_exceptions_test: CompileTimeError
168+
positive_token_pos_test: CompileTimeError
169+
process_service_test: CompileTimeError
170+
reachable_size_test: CompileTimeError
171+
read_stream_test: CompileTimeError
172+
regexp_function_test: CompileTimeError
173+
regress_28443_test: CompileTimeError
174+
regress_28980_test: CompileTimeError
175+
reload_sources_test: CompileTimeError
176+
rewind_optimized_out_test: CompileTimeError
177+
rewind_test: CompileTimeError
178+
set_library_debuggable_rpc_test: CompileTimeError
179+
set_library_debuggable_test: CompileTimeError
180+
set_name_rpc_test: CompileTimeError
181+
set_vm_name_rpc_test: CompileTimeError
182+
steal_breakpoint_test: CompileTimeError
183+
step_into_async_no_await_test: CompileTimeError
184+
step_over_await_test: CompileTimeError
185+
step_test: CompileTimeError
186+
step_through_arithmetic_test: CompileTimeError
187+
step_through_constructor_calls_test: CompileTimeError
188+
step_through_function_2_test: CompileTimeError
189+
step_through_function_test: CompileTimeError
190+
step_through_getter_test: CompileTimeError
191+
step_through_property_get_test: CompileTimeError
192+
step_through_property_set_test: CompileTimeError
193+
step_through_setter_test: CompileTimeError
194+
step_through_switch_test: CompileTimeError
195+
step_through_switch_with_continue_test: CompileTimeError
196+
string_escaping_test: CompileTimeError
197+
tcp_socket_closing_service_test: CompileTimeError
198+
tcp_socket_service_test: CompileTimeError
199+
type_arguments_test: CompileTimeError
200+
typed_data_test: CompileTimeError
201+
udp_socket_service_test: CompileTimeError
202+
vm_test: CompileTimeError
203+
vm_timeline_events_test: CompileTimeError
204+
vm_timeline_flags_test: CompileTimeError
205+
weak_properties_test: CompileTimeError
206+

runtime/tests/vm/vm.status

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,12 @@ cc/Parser_AllocateVariables_MiddleChain: Crash
315315
cc/Parser_AllocateVariables_NestedCapturedVar: Crash
316316
cc/Parser_AllocateVariables_TwoChains: Crash
317317

318+
[ $compiler == dartk && $strong ]
319+
dart/data_uri_spawn_test: CompileTimeError # Issue 31586
320+
dart/hello_fuchsia_test: RuntimeError
321+
dart/optimized_stacktrace_line_and_column_test: CompileTimeError # Issue 31586
322+
dart/optimized_stacktrace_line_test: CompileTimeError # Issue 31586
323+
318324
[ $compiler == dartkp && ($runtime == dart_precompiled || $runtime == vm) ]
319325
dart/data_uri_import_test/base64: CompileTimeError
320326
dart/data_uri_import_test/nocharset: CompileTimeError

samples/samples.status

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ sample_extension/test/*: Skip # These tests attempt to spawn another script usin
2929
[ $compiler == none && $runtime == vm && $system == windows && $mode == debug ]
3030
sample_extension/test/sample_extension_app_snapshot_test: Pass, RuntimeError # Issue 28842
3131

32+
[ $compiler == dartk && $strong ]
33+
sample_extension/test/sample_extension_app_snapshot_test: RuntimeError
34+
sample_extension/test/sample_extension_script_snapshot_test: RuntimeError
35+
sample_extension/test/sample_extension_test: RuntimeError
36+
3237
[ $compiler == dartkp ]
3338
sample_extension/test/sample_extension_app_snapshot_test: RuntimeError
3439
sample_extension/test/sample_extension_script_snapshot_test: RuntimeError

tests/co19/co19-kernel.status

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,17 @@ Language/Overview/Scoping/hiding_declaration_t12: Pass
2626
[ $compiler == dartk && $mode == debug ]
2727
LibTest/isolate/Isolate/spawnUri_A01_t04: Pass, Slow, Timeout
2828

29+
[ $compiler == dartk && $strong ]
30+
*: SkipByDesign
31+
2932
# dartk: precompilation failures (debug)
3033
[ $compiler == dartkp && $mode == debug ]
3134
Language/Functions/External_Functions/not_connected_to_a_body_t01: Crash
3235
Language/Statements/For/Asynchronous_For_in/execution_t04: Crash
3336

37+
[ $compiler == dartkp && $strong ]
38+
*: SkipByDesign
39+
3440
[ $mode == debug && ($compiler == dartk || $compiler == dartkp) ]
3541
Language/Classes/Constructors/Generative_Constructors/execution_t04: Crash
3642
Language/Classes/Instance_Variables/constant_t01: Crash

tests/isolate/isolate.status

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,55 @@ spawn_uri_test: SkipByDesign # Loading another file is not supported in JS shell
104104
[ $compiler == dart2js && ($runtime == chrome || $runtime == chromeOnAndroid || $runtime == drt || $runtime == ff || $runtime == safari) ]
105105
isolate_stress_test: Pass, Slow # Issue 10697
106106

107+
[ $compiler == dartk && $strong ]
108+
checked_test: RuntimeError
109+
count_test: CompileTimeError
110+
cross_isolate_message_test: CompileTimeError
111+
error_at_spawnuri_test: RuntimeError
112+
error_exit_at_spawnuri_test: RuntimeError
113+
exit_at_spawnuri_test: RuntimeError
114+
function_send1_test: CompileTimeError
115+
function_send_test: CompileTimeError
116+
handle_error2_test: CompileTimeError
117+
handle_error3_test: CompileTimeError
118+
illegal_msg_function_test: CompileTimeError
119+
illegal_msg_mirror_test: CompileTimeError
120+
isolate_complex_messages_test: CompileTimeError
121+
isolate_current_test: CompileTimeError
122+
issue_21398_parent_isolate1_test: RuntimeError
123+
issue_21398_parent_isolate_test: RuntimeError
124+
issue_22778_test: Crash
125+
issue_24243_parent_isolate_test: RuntimeError
126+
kill_self_synchronously_test: RuntimeError
127+
kill_test: CompileTimeError
128+
mandel_isolate_test: CompileTimeError
129+
message2_test: CompileTimeError
130+
message3_test/byteBuffer: CompileTimeError
131+
message3_test/constInstance: CompileTimeError
132+
message3_test/constList: CompileTimeError
133+
message3_test/constList_identical: CompileTimeError
134+
message3_test/constMap: CompileTimeError
135+
message3_test/fun: CompileTimeError
136+
message3_test/int32x4: CompileTimeError
137+
message3_test/none: CompileTimeError
138+
message_test: CompileTimeError
139+
mint_maker_test: CompileTimeError
140+
nested_spawn2_test: CompileTimeError
141+
nested_spawn_test: CompileTimeError
142+
raw_port_test: CompileTimeError
143+
request_reply_test: CompileTimeError
144+
spawn_function_custom_class_test: CompileTimeError
145+
spawn_function_test: CompileTimeError
146+
spawn_uri_exported_main_test: RuntimeError
147+
spawn_uri_multi_test/none: CompileTimeError
148+
spawn_uri_nested_vm_test: CompileTimeError
149+
spawn_uri_test: CompileTimeError
150+
spawn_uri_vm_test: CompileTimeError
151+
static_function_test: CompileTimeError
152+
timer_isolate_test: CompileTimeError
153+
typed_message_test: CompileTimeError
154+
unresolved_ports_test: CompileTimeError
155+
107156
[ $compiler == none && $runtime == vm && $system == fuchsia ]
108157
*: Skip # Not yet triaged.
109158

tests/kernel/kernel.status

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ unsorted/super_mixin_test: CompileTimeError
1717
unsorted/invocation_errors_test: StaticWarning
1818
unsorted/super_mixin_test: CompileTimeError
1919

20+
[ $compiler == dartk && $strong ]
21+
unsorted/loop_test: RuntimeError
22+
unsorted/nsm_dispatcher_test: CompileTimeError
23+
unsorted/types_test: RuntimeError
24+
2025
[ $runtime == dart_precompiled && $minified ]
2126
unsorted/symbol_literal_test: Skip # Expects unobfuscated Symbol.toString.
22-

tests/standalone/standalone.status

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ io/*: Skip # Issue 30618
3838
[ $compiler == dart2analyzer && ($builder_tag == strong || $strong) ]
3939
*: Skip # Issue 28649
4040

41+
[ $compiler == dartk && $strong ]
42+
*: SkipByDesign
43+
4144
[ $compiler == none && $runtime == vm && $system == fuchsia ]
4245
*: Skip # Not yet triaged.
4346

tools/bots/dart_tests.isolate

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
'pkg/meta/',
2121
'pkg/pkg.status',
2222
'pkg/status_file/',
23+
'pkg/vm/',
2324
'runtime/tests/',
2425
'.packages']
2526
}

tools/bots/test_matrix.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"pkg/meta/",
2121
"pkg/pkg.status",
2222
"pkg/status_file/",
23+
"pkg/vm/",
2324
"runtime/",
2425
"sdk/",
2526
".packages"

tools/testing/dart/compiler_configuration.dart

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,19 +149,26 @@ class NoneCompilerConfiguration extends CompilerConfiguration {
149149
var buildDir = _configuration.buildDirectory;
150150
var args = <String>[];
151151
if (useDfe) {
152-
args.add('--dfe=${buildDir}/gen/kernel-service.dart.snapshot');
153-
args.add('--kernel-binaries=' +
154-
(_useSdk
155-
? '${_configuration.buildDirectory}/dart-sdk/lib/_internal'
156-
: '${buildDir}'));
152+
// DFE+strong configuration is a Dart 2.0 configuration which uses
153+
// pkg/vm/tool/dart2 wrapper script, which takes care of passing
154+
// correct arguments to VM binary. No need to pass any additional
155+
// arguments.
156+
if (!_isStrong) {
157+
args.add('--dfe=${buildDir}/gen/kernel-service.dart.snapshot');
158+
args.add('--kernel-binaries=' +
159+
(_useSdk
160+
? '${_configuration.buildDirectory}/dart-sdk/lib/_internal'
161+
: '${buildDir}'));
162+
}
157163
if (_isDebug) {
158164
// Temporarily disable background compilation to avoid flaky crashes
159165
// (see http://dartbug.com/30016 for details).
160166
args.add('--no-background-compilation');
161167
}
162-
}
163-
if (_isStrong) {
164-
args.add('--strong');
168+
} else {
169+
if (_isStrong) {
170+
args.add('--strong');
171+
}
165172
}
166173
if (_isChecked) {
167174
args.add('--enable_asserts');

tools/testing/dart/configuration.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,13 @@ class Configuration {
175175
return _servers;
176176
}
177177

178+
/// Returns true if this configuration is considered Dart 2.0 configuration
179+
/// by VM (which is identified by using common front-end and strong mode).
180+
/// In this case instead of invoking VM binary directly we use
181+
/// pkg/vm/tool/dart2 wrapper script, which takes care of passing
182+
/// correct arguments to VM binary.
183+
bool get usingDart2VMWrapper => isStrong && compiler == Compiler.dartk;
184+
178185
/// The base directory named for this configuration, like:
179186
///
180187
/// none_vm_release_x64

tools/testing/dart/test_suite.dart

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,14 @@ abstract class TestSuite {
164164
// Controlled by user with the option "--dart".
165165
var dartExecutable = configuration.dartPath;
166166

167+
if (configuration.usingDart2VMWrapper) {
168+
if (dartExecutable != null) {
169+
throw 'Can not use --dart when testing Dart 2.0 configuration';
170+
}
171+
172+
dartExecutable = 'pkg/vm/tool/dart2';
173+
}
174+
167175
if (dartExecutable == null) {
168176
var suffix = executableBinarySuffix;
169177
dartExecutable = useSdk
@@ -815,7 +823,8 @@ class StandardTestSuite extends TestSuite {
815823
// turn on reified generics in the VM.
816824
// Note that VMOptions=--no-reify-generic-functions in test is ignored.
817825
// Also, enable Dart 2.0 fixed-size integers with --limit-ints-to-64-bits.
818-
if (suiteName.endsWith("_2")) {
826+
// Dart 2 VM wrapper (pkg/vm/tool/dart2) already passes correct arguments.
827+
if (suiteName.endsWith("_2") && !configuration.usingDart2VMWrapper) {
819828
allVmOptions = allVmOptions.toList()
820829
..add("--reify-generic-functions")
821830
..add("--limit-ints-to-64-bits");

0 commit comments

Comments
 (0)