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

Unified Diff: tests/standalone/src/ProcessTestUtil.dart

Issue 8662006: Fix a number of issues with the process handling (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments from ager@ 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/standalone/src/ProcessStdoutTest.dart ('k') | tests/standalone/src/TestRunnerTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/ProcessTestUtil.dart
diff --git a/tests/standalone/src/ProcessTestUtil.dart b/tests/standalone/src/ProcessTestUtil.dart
index 4a465eb170670e24195556cb6772b0c797aef996..971fbb9d038eacbb53d3a989deca8267ae55e992 100644
--- a/tests/standalone/src/ProcessTestUtil.dart
+++ b/tests/standalone/src/ProcessTestUtil.dart
@@ -2,16 +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.
-String getProcessTestFileName() {
+String getPlatformOutDir() {
var os = new Platform().operatingSystem();
+ if (os == 'linux') return 'out';
+ if (os == 'macos') 'xcodebuild';
+ return ''; // Windows.
+}
- var outDir = '';
- if (os == 'linux') {
- outDir = 'out';
- } else if (os == 'macos') {
- outDir = 'xcodebuild';
- }
-
+String getProcessTestFileName() {
+ var outDir = getPlatformOutDir();
var names = ['$outDir/Release_ia32/process_test',
'$outDir/Debug_ia32/process_test'];
@@ -20,6 +19,18 @@ String getProcessTestFileName() {
return name;
}
}
+ Expect.fail('Could not find the process_test executable.');
+}
- Expect.fail('Could not find the process_test program.');
+String getDartFileName() {
+ var outDir = getPlatformOutDir();
+ var names = ['$outDir/Release_ia32/dart',
+ '$outDir/Debug_ia32/dart'];
+
+ for (var name in names) {
+ if (new File(name).existsSync()) {
+ return name;
+ }
+ }
+ Expect.fail('Could not find the dart executable.');
}
« no previous file with comments | « tests/standalone/src/ProcessStdoutTest.dart ('k') | tests/standalone/src/TestRunnerTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698