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

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

Issue 8679008: Fix running process tests on Windows (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | 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 0bc0fe78c44e38b97fd4b51140c65a573a71d08d..459484b9672e8494c00aee603049080b99179747 100644
--- a/tests/standalone/src/ProcessTestUtil.dart
+++ b/tests/standalone/src/ProcessTestUtil.dart
@@ -4,15 +4,22 @@
String getPlatformOutDir() {
var os = new Platform().operatingSystem();
- if (os == 'linux') return 'out';
- if (os == 'macos') return 'xcodebuild';
+ if (os == 'linux') return 'out/';
+ if (os == 'macos') return 'xcodebuild/';
return ''; // Windows.
}
+String getPlatformExecutableExtension() {
+ var os = new Platform().operatingSystem();
+ if (os == 'windows') return '.exe';
+ return ''; // Linux and Mac OS.
+}
+
String getProcessTestFileName() {
var outDir = getPlatformOutDir();
- var names = ['$outDir/Release_ia32/process_test',
- '$outDir/Debug_ia32/process_test'];
+ var extension = getPlatformExecutableExtension();
+ var names = ['${outDir}Release_ia32/process_test$extension',
+ '${outDir}Debug_ia32/process_test$extension'];
for (var name in names) {
if (new File(name).existsSync()) {
@@ -24,8 +31,9 @@ String getProcessTestFileName() {
String getDartFileName() {
var outDir = getPlatformOutDir();
- var names = ['$outDir/Release_ia32/dart',
- '$outDir/Debug_ia32/dart'];
+ var extension = getPlatformExecutableExtension();
+ var names = ['${outDir}Release_ia32/dart$extension',
+ '${outDir}Debug_ia32/dart$extension'];
for (var name in names) {
if (new File(name).existsSync()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698