diff --git a/runtime/tests/vm/dart/appjit_bytecode_simple_test.dart b/runtime/tests/vm/dart/appjit_bytecode_simple_test.dart index 66004825600..d9363398ccd 100644 --- a/runtime/tests/vm/dart/appjit_bytecode_simple_test.dart +++ b/runtime/tests/vm/dart/appjit_bytecode_simple_test.dart @@ -2,11 +2,15 @@ // 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. +// OtherResources=appjit_bytecode_simple_test_body.dart + // Verify that app-jit snapshot contains dependencies between classes and CHA // optimized code. import 'dart:async'; +import 'dart:io' show Platform; import 'snapshot_test_helper.dart'; -Future main() => runAppJitBytecodeTest(); +Future main() => runAppJitBytecodeTest( + Platform.script.resolve('appjit_bytecode_simple_test_body.dart')); diff --git a/runtime/tests/vm/dart/appjit_cha_deopt_test.dart b/runtime/tests/vm/dart/appjit_cha_deopt_test.dart index fabc41bf514..104d431f7e7 100644 --- a/runtime/tests/vm/dart/appjit_cha_deopt_test.dart +++ b/runtime/tests/vm/dart/appjit_cha_deopt_test.dart @@ -2,13 +2,16 @@ // 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. +// OtherResources=appjit_cha_deopt_test_body.dart // VMOptions=--optimization-counter-threshold=100 // Verify that app-jit snapshot contains dependencies between classes and CHA // optimized code. import 'dart:async'; +import 'dart:io' show Platform; import 'snapshot_test_helper.dart'; -Future main() => runAppJitTest(); +Future main() => + runAppJitTest(Platform.script.resolve('appjit_cha_deopt_test_body.dart')); diff --git a/runtime/tests/vm/dart/appjit_load_static_licm_test.dart b/runtime/tests/vm/dart/appjit_load_static_licm_test.dart index 9f51b700125..804e30c4f4c 100644 --- a/runtime/tests/vm/dart/appjit_load_static_licm_test.dart +++ b/runtime/tests/vm/dart/appjit_load_static_licm_test.dart @@ -2,11 +2,15 @@ // 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. +// OtherResources=appjit_load_static_licm_test_body.dart + // Verify that app-jit snapshot contains dependencies between classes and CHA // optimized code. import 'dart:async'; +import 'dart:io' show Platform; import 'snapshot_test_helper.dart'; -Future main() => runAppJitTest(); +Future main() => runAppJitTest( + Platform.script.resolve('appjit_load_static_licm_test_body.dart')); diff --git a/runtime/tests/vm/dart/snapshot_test_helper.dart b/runtime/tests/vm/dart/snapshot_test_helper.dart index 0a043aff50b..5c63da1f1a6 100644 --- a/runtime/tests/vm/dart/snapshot_test_helper.dart +++ b/runtime/tests/vm/dart/snapshot_test_helper.dart @@ -151,12 +151,10 @@ checkDeterministicSnapshot(String snapshotKind, String expectedStdout) async { }); } -runAppJitTest() async { +runAppJitTest(Uri testScriptUri) async { await withTempDir((String temp) async { final snapshotPath = p.join(temp, 'app.jit'); - final testPath = Platform.script - .toFilePath() - .replaceAll(new RegExp(r'_test.dart$'), '_test_body.dart'); + final testPath = testScriptUri.toFilePath(); final trainingResult = await runDart('TRAINING RUN', [ '--snapshot=$snapshotPath', @@ -170,12 +168,10 @@ runAppJitTest() async { }); } -Future runAppJitBytecodeTest() async { +Future runAppJitBytecodeTest(Uri testScriptUri) async { await withTempDir((String temp) async { final snapshotPath = p.join(temp, 'app.jit'); - final testPath = Platform.script - .toFilePath() - .replaceAll(new RegExp(r'_test.dart$'), '_test_body.dart'); + final testPath = testScriptUri.toFilePath(); final trainingResult = await runDart('TRAINING RUN', [ '--enable_interpreter', diff --git a/tests/standalone_2/io/secure_socket_renegotiate_test.dart b/tests/standalone_2/io/secure_socket_renegotiate_test.dart index e527da9caf7..d10e7430f23 100644 --- a/tests/standalone_2/io/secure_socket_renegotiate_test.dart +++ b/tests/standalone_2/io/secure_socket_renegotiate_test.dart @@ -4,6 +4,7 @@ // // OtherResources=certificates/server_chain.pem // OtherResources=certificates/server_key.pem +// OtherResources=secure_socket_renegotiate_client.dart // This test verifies that client certificates work, if the client and server // are in separate processes, and that connection renegotiation works, and @@ -66,10 +67,10 @@ Future runServer() { void main() { runServer().then((SecureServerSocket server) { var clientScript = - Platform.script.toFilePath().replaceFirst("_test.dart", "_client.dart"); - Expect.isTrue(clientScript.endsWith("_client.dart")); + Platform.script.resolve('secure_socket_renegotiate_client.dart').toFilePath(); Process - .run(Platform.executable, [clientScript, server.port.toString()]).then( + .run(Platform.executable, + []..addAll(Platform.executableArguments)..addAll([clientScript, server.port.toString()])).then( (ProcessResult result) { if (result.exitCode != 0) { print("Client failed, stdout:");