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

Side by Side Diff: tests/standalone/src/TestRunnerTest.dart

Issue 8540002: Use the configuration for determining the binary to use for testing. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/standalone/src/StatusExpressionTest.dart ('k') | tests/standalone/test_config.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #library("TestRunnerTest"); 5 #library("TestRunnerTest");
6 6
7 #import("../../../tools/testing/dart/test_runner.dart"); 7 #import("../../../tools/testing/dart/test_runner.dart");
8 #import("../../../tools/testing/dart/status_file_parser.dart"); 8 #import("../../../tools/testing/dart/status_file_parser.dart");
9 9
10 // TODO(whesse) source("ProcessTestUtil.dart"); when it is committed. 10 // TODO(whesse) source("ProcessTestUtil.dart"); when it is committed.
(...skipping 26 matching lines...) Expand all
37 } 37 }
38 38
39 TestCase MakeTestCase(String testName, List<String> expectations) { 39 TestCase MakeTestCase(String testName, List<String> expectations) {
40 String test_path = "tests/standalone/src/${testName}.dart"; 40 String test_path = "tests/standalone/src/${testName}.dart";
41 // Working directory may be dart/runtime rather than dart. 41 // Working directory may be dart/runtime rather than dart.
42 if (!new File(test_path).existsSync()) { 42 if (!new File(test_path).existsSync()) {
43 test_path = "../tests/standalone/src/${testName}.dart"; 43 test_path = "../tests/standalone/src/${testName}.dart";
44 } 44 }
45 45
46 return new TestCase(testName, 46 return new TestCase(testName,
47 getDartShellFileName(), 47 getDartBinName(),
48 <String>["--ignore-unrecognized-flags", 48 <String>["--ignore-unrecognized-flags",
49 "--enable_type_checks", 49 "--enable_type_checks",
50 test_path], 50 test_path],
51 TestController.processCompletedTest, 51 TestController.processCompletedTest,
52 new Set<String>.from(expectations)); 52 new Set<String>.from(expectations));
53 } 53 }
54 54
55
56 String getDartBinName() {
57 var names = ["out/Debug_ia32/dart_bin",
58 "out/Release_ia32/dart_bin",
59 "xcodebuild/Debug_ia32/dart_bin",
60 "xcodebuild/Release_ia32/dart_bin",
61 "Debug_ia32/dart_bin.exe",
62 "Release_ia32/dart_bin.exe"];
63 for (var name in names) {
64 if (new File(name).existsSync()) {
65 return name;
66 }
67 }
68 }
69
70
55 String getProcessTestFileName() { 71 String getProcessTestFileName() {
56 var names = ['out/Release_ia32/process_test', 72 var names = ['out/Release_ia32/process_test',
57 'out/Debug_ia32/process_test', 73 'out/Debug_ia32/process_test',
58 'xcodebuild/Release_ia32/process_test', 74 'xcodebuild/Release_ia32/process_test',
59 'xcodebuild/Debug_ia32/process_test', 75 'xcodebuild/Debug_ia32/process_test',
60 'Release_ia32/process_test.exe', 76 'Release_ia32/process_test.exe',
61 'Debug_ia32/process_test.exe']; 77 'Debug_ia32/process_test.exe'];
62 for (var name in names) { 78 for (var name in names) {
63 if (new File(name).existsSync()) { 79 if (new File(name).existsSync()) {
64 return name; 80 return name;
(...skipping 13 matching lines...) Expand all
78 const ["0", "0", "1", "1"], 94 const ["0", "0", "1", "1"],
79 TestController.processCompletedTest, 95 TestController.processCompletedTest,
80 new Set<String>.from([CRASH])), 96 new Set<String>.from([CRASH])),
81 timeout).start(); 97 timeout).start();
82 Expect.equals(4, TestController.numTests); 98 Expect.equals(4, TestController.numTests);
83 // Throw must be from body of start() function for this test to work. 99 // Throw must be from body of start() function for this test to work.
84 Expect.throws( 100 Expect.throws(
85 new RunningProcess(MakeTestCase("PassTest", [SKIP]), timeout).start); 101 new RunningProcess(MakeTestCase("PassTest", [SKIP]), timeout).start);
86 } 102 }
87 103
OLDNEW
« no previous file with comments | « tests/standalone/src/StatusExpressionTest.dart ('k') | tests/standalone/test_config.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698