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

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

Issue 9233015: Make test.dart run web tests on Windows. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 11 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/testing/dart/test_runner.dart ('k') | tools/testing/run_selenium.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_suite.dart
===================================================================
--- tools/testing/dart/test_suite.dart (revision 3505)
+++ tools/testing/dart/test_suite.dart (working copy)
@@ -409,7 +409,15 @@
// the client/samples/dartcombat test to its css file, remove the
// "../../" from this path, and move this out of the isWebTest guard.
// Also remove getHtmlName, and just use test.html.
- htmlPath = '${tempDir.path}/../../${getHtmlName(filename)}';
+ // TODO(efortuna): this shortening of htmlFilename is a band-aid until
+ // the above gets fixed. Windows cannot have paths that are longer than
+ // 260 characters, and without this hack, we were running past the
+ // limit.
+ String htmlFilename = getHtmlName(filename);
+ while ('${tempDir.path}/../../$htmlFilename'.length >= 260) {
+ htmlFilename = htmlFilename.substring(htmlFilename.length~/2);
+ }
+ htmlPath = '${tempDir.path}/../../$htmlFilename';
}
final String scriptPath = (component == 'dartium') ?
dartWrapperFilename : compiledDartWrapperFilename;
@@ -443,9 +451,9 @@
if (libdir == '') {
libdir = '$dartDir/frog/lib';
}
- compilerArgs.addAll(['--libdir=$libdir',
- '--compile-only',
- '--out=$compiledDartWrapperFilename']);
+ compilerArgs.addAll(['--compile-only',
+ '--out=$compiledDartWrapperFilename',
+ '--libdir=$libdir']);
compilerArgs.addAll(vmOptions);
compilerArgs.add(dartWrapperFilename);
break;
@@ -461,9 +469,14 @@
String executable = getFilename(dumpRenderTreeFilename);
List<String> args;
if (component == 'webdriver') {
- // TODO(efortuna): These paths are not OS independent!
executable = '$dartDir/tools/testing/run_selenium.py';
- args = ['--out', htmlPath, '--browser', configuration['browser']];
+ if (new Platform().operatingSystem() == 'windows') {
+ // For Windows, the first command, must have the Windows
+ // slash direction.
+ // TODO(efortuna): Get rid of this hack when issue 1306 is fixed.
+ executable = executable.replaceAll('/', '\\');
+ }
+ args = ['--out=$htmlPath', '--browser=${configuration["browser"]}'];
} else {
args = ['--no-timeout'];
if (component == 'dartium') {
@@ -907,14 +920,16 @@
static String compilerName(Map configuration) {
String postfix =
- (new Platform().operatingSystem() == 'windows') ? '.exe' : '';
+ ((new Platform().operatingSystem() == 'windows') &&
+ (configuration['component'] != 'frogium' &&
+ configuration['component'] != 'webdriver')) ? '.exe' : '';
Bill Hesse 2012/01/24 09:29:22 I meant that 2/3 of the condition here can be elim
Emily Fortuna 2012/01/24 17:20:22 Right. I ended up fixing it in a new CL here (http
switch (configuration['component']) {
case 'chromium':
case 'dartc':
return 'compiler/bin/dartc$postfix';
case 'frogium':
case 'webdriver':
- return 'frog/bin/frogsh$postfix';
+ return 'frog/bin/frogsh';
default:
throw "Unknown compiler for: ${configuration['component']}";
}
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | tools/testing/run_selenium.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698