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

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
Index: tools/testing/dart/test_suite.dart
===================================================================
--- tools/testing/dart/test_suite.dart (revision 3477)
+++ tools/testing/dart/test_suite.dart (working copy)
@@ -409,7 +409,13 @@
// 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.
Bill Hesse 2012/01/22 20:52:02 Let's file a bug - this needs to get fixed.
Emily Fortuna 2012/01/23 18:27:41 File a bug on Microsoft? This is a Windows API iss
Emily Fortuna 2012/01/23 19:18:49 Talked to Siggi about this. Once you fix your abov
+ String htmlFilename = getHtmlName(filename);
+ htmlFilename = htmlFilename.substring(htmlFilename.length~/2);
Siggi Cherem (dart-lang) 2012/01/23 00:29:02 could we do this selectively (only when we are clo
+ htmlPath = '${tempDir.path}/../../$htmlFilename';
}
final String scriptPath = (component == 'dartium') ?
dartWrapperFilename : compiledDartWrapperFilename;
@@ -440,11 +446,13 @@
case 'frogium':
case 'webdriver':
String libdir = configuration['froglib'];
- if (libdir == '') {
+ if (libdir == '' && ! compilerExecutable.endsWith('frogsh')) {
Siggi Cherem (dart-lang) 2012/01/23 00:29:02 remove space after !
Emily Fortuna 2012/01/23 18:27:41 Done.
libdir = '$dartDir/frog/lib';
}
- compilerArgs.addAll(['--libdir=$libdir',
- '--compile-only',
+ if (!compilerExecutable.endsWith('frogsh')) {
Siggi Cherem (dart-lang) 2012/01/23 00:29:02 I thought there was going to be a different libdir
+ compilerArgs.add('--libdir=$libdir');
+ }
+ compilerArgs.addAll(['--compile-only',
'--out=$compiledDartWrapperFilename']);
compilerArgs.addAll(vmOptions);
compilerArgs.add(dartWrapperFilename);
@@ -461,9 +469,13 @@
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.
+ executable = executable.replaceAll('/', '\\');
Bill Hesse 2012/01/22 20:52:02 TODO, with bug number.
Emily Fortuna 2012/01/23 18:27:41 Done.
+ }
+ args = ['--out=$htmlPath', '--browser=${configuration["browser"]}'];
} else {
args = ['--no-timeout'];
if (component == 'dartium') {
@@ -907,7 +919,9 @@
static String compilerName(Map configuration) {
String postfix =
- (new Platform().operatingSystem() == 'windows') ? '.exe' : '';
+ ((new Platform().operatingSystem() == 'windows') &&
+ (configuration['component'] != 'frogium' &&
+ configuration['component'] != 'webdriver')) ? '.exe' : '';
switch (configuration['component']) {
case 'chromium':
case 'dartc':

Powered by Google App Engine
This is Rietveld 408576698