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

Side by Side Diff: tools/testing/dart/test_suite.dart

Issue 9513002: test.dart: fix for dartium. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** 5 /**
6 * Classes and methods for enumerating and preparing tests. 6 * Classes and methods for enumerating and preparing tests.
7 * 7 *
8 * This library includes: 8 * This library includes:
9 * 9 *
10 * - Creating tests by listing all the Dart files in certain directories, 10 * - Creating tests by listing all the Dart files in certain directories,
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 } 505 }
506 htmlTest.writeStringSync(GetHtmlContents( 506 htmlTest.writeStringSync(GetHtmlContents(
507 filename, 507 filename,
508 '$filePrefix$dartDir/client/testing/unittest/test_controller.js', 508 '$filePrefix$dartDir/client/testing/unittest/test_controller.js',
509 scriptType, 509 scriptType,
510 filePrefix + scriptPath)); 510 filePrefix + scriptPath));
511 htmlTest.closeSync(); 511 htmlTest.closeSync();
512 512
513 // Construct the command(s) that compile all the inputs needed by the 513 // Construct the command(s) that compile all the inputs needed by the
514 // browser test. For dartium, this will be noop commands. 514 // browser test. For dartium, this will be noop commands.
515 List<Command> commands = [_compileCommand( 515 List<Command> commands = [];
516 dartWrapperFilename, compiledDartWrapperFilename, 516 if (component != 'dartium') {
517 component, tempDir.path, vmOptions)]; 517 commands.add(_compileCommand(
518 dartWrapperFilename, compiledDartWrapperFilename,
519 component, tempDir.path, vmOptions));
518 520
519 // some tests require compiling multiple input scripts. 521 // some tests require compiling multiple input scripts.
520 List<String> otherScripts = optionsFromFile['otherScripts']; 522 List<String> otherScripts = optionsFromFile['otherScripts'];
521 for (String name in otherScripts) { 523 for (String name in otherScripts) {
522 int end = filename.lastIndexOf('/'); 524 int end = filename.lastIndexOf('/');
523 if (end == -1) { 525 if (end == -1) {
524 print('Warning: error processing "OtherScripts" of $filename.'); 526 print('Warning: error processing "OtherScripts" of $filename.');
525 print('Skipping test ($testName).'); 527 print('Skipping test ($testName).');
526 return; 528 return;
529 }
530 String dir = filename.substring(0, end);
531 end = name.lastIndexOf('.dart');
532 if (end == -1) {
533 print('Warning: error processing "OtherScripts" in $filename.');
534 print('Skipping test ($testName).');
535 return;
536 }
537 String compiledName = '${name.substring(0, end)}.js';
538 commands.add(_compileCommand(
539 '$dir/$name', '${tempDir.path}/$compiledName',
540 component, tempDir.path, vmOptions));
527 } 541 }
528 String dir = filename.substring(0, end);
529 end = name.lastIndexOf('.dart');
530 if (end == -1) {
531 print('Warning: error processing "OtherScripts" in $filename.');
532 print('Skipping test ($testName).');
533 return;
534 }
535 String compiledName = '${name.substring(0, end)}.js';
536 commands.add(_compileCommand(
537 '$dir/$name', '${tempDir.path}/$compiledName',
538 component, tempDir.path, vmOptions));
539 } 542 }
540 543
541 // Construct the command that executes the browser test 544 // Construct the command that executes the browser test
542 List<String> args; 545 List<String> args;
543 if (component == 'webdriver') { 546 if (component == 'webdriver') {
544 args = ['$dartDir/tools/testing/run_selenium.py', 547 args = ['$dartDir/tools/testing/run_selenium.py',
545 '--browser=${configuration["browser"]}', 548 '--browser=${configuration["browser"]}',
546 '--timeout=${configuration["timeout"] - 2}', 549 '--timeout=${configuration["timeout"] - 2}',
547 '--out=$htmlPath']; 550 '--out=$htmlPath'];
548 } else { 551 } else {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 String libdir = configuration['froglib']; 595 String libdir = configuration['froglib'];
593 if (libdir == '') { 596 if (libdir == '') {
594 libdir = '$dartDir/frog/lib'; 597 libdir = '$dartDir/frog/lib';
595 } 598 }
596 args.addAll(['--libdir=$libdir', 599 args.addAll(['--libdir=$libdir',
597 '--compile-only', 600 '--compile-only',
598 '--out=$outputFile']); 601 '--out=$outputFile']);
599 args.addAll(vmOptions); 602 args.addAll(vmOptions);
600 args.add(inputFile); 603 args.add(inputFile);
601 break; 604 break;
602 case 'dartium':
603 // No compilation phase.
604 args = null;
605 break;
606 default: 605 default:
607 Expect.fail('unimplemented component $component'); 606 Expect.fail('unimplemented component $component');
608 } 607 }
609 return new Command(executable, args); 608 return new Command(executable, args);
610 } 609 }
611 610
612 bool get requiresCleanTemporaryDirectory() => 611 bool get requiresCleanTemporaryDirectory() =>
613 configuration['component'] == 'dartc' || 612 configuration['component'] == 'dartc' ||
614 configuration['component'] == 'chromium'; 613 configuration['component'] == 'chromium';
615 614
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
1172 * $noCrash tests are expected to be flaky but not crash 1171 * $noCrash tests are expected to be flaky but not crash
1173 * $pass tests are expected to pass 1172 * $pass tests are expected to pass
1174 * $failOk tests are expected to fail that we won't fix 1173 * $failOk tests are expected to fail that we won't fix
1175 * $fail tests are expected to fail that we should fix 1174 * $fail tests are expected to fail that we should fix
1176 * $crash tests are expected to crash that we should fix 1175 * $crash tests are expected to crash that we should fix
1177 * $timeout tests are allowed to timeout 1176 * $timeout tests are allowed to timeout
1178 """; 1177 """;
1179 print(report); 1178 print(report);
1180 } 1179 }
1181 } 1180 }
OLDNEW
« 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