Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Unified Diff: tools/testing/dart/test_suite.dart

Issue 15963011: Use run_vm_tests.host to list VM tests if possible (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_suite.dart
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index 9e9672c4dc956b8ad5898a783fce047cb54483ae..74aa914c94f921bff72c327210eb8f6e6fc18ca4 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -304,7 +304,8 @@ void ccTestLister() {
*/
class CCTestSuite extends TestSuite {
final String testPrefix;
- String runnerPath;
+ String targetRunnerPath;
+ String hostRunnerPath;
final String dartDir;
List<String> statusFilePaths;
TestCaseEvent doTest;
@@ -319,7 +320,18 @@ class CCTestSuite extends TestSuite {
{this.testPrefix: ''})
: super(configuration, suiteName),
dartDir = TestUtils.dartDir().toNativePath() {
- runnerPath = '$buildDir/$runnerName';
+ // For running the tests we use the given '$runnerName' binary
+ targetRunnerPath = '$buildDir/$runnerName';
+
+ // For listing the tests we use the '$runnerName.host' binary if it exists
+ // and use '$runnerName' if it doesn't.
+ var binarySuffix = Platform.operatingSystem == 'windows' ? '.exe' : '';
+ var hostBinary = '$targetRunnerPath.host$binarySuffix';
+ if (new File(hostBinary).existsSync()) {
+ hostRunnerPath = hostBinary;
+ } else {
+ hostRunnerPath = targetRunnerPath;
+ }
}
void testNameHandler(String testName, ignore) {
@@ -347,7 +359,7 @@ class CCTestSuite extends TestSuite {
args.add(testName);
doTest(new TestCase(constructedName,
- [new Command(runnerPath, args)],
+ [new Command(targetRunnerPath, args)],
configuration,
completeHandler,
expectations));
@@ -364,7 +376,7 @@ class CCTestSuite extends TestSuite {
if (filesRead == statusFilePaths.length) {
receiveTestName = new ReceivePort();
var port = spawnFunction(ccTestLister);
- port.send(runnerPath, receiveTestName.toSendPort());
+ port.send(hostRunnerPath, receiveTestName.toSendPort());
receiveTestName.receive(testNameHandler);
}
}
« no previous file with comments | « tools/test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698