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

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

Issue 11031064: Reland support for firefox jsshell. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 | « tools/testing/dart/test_runner.dart ('k') | 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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 args = new List.from(args); 462 args = new List.from(args);
463 String tempDir = createOutputDirectory(info.filePath, ''); 463 String tempDir = createOutputDirectory(info.filePath, '');
464 args.add('--out=$tempDir/out.js'); 464 args.add('--out=$tempDir/out.js');
465 List<Command> commands = <Command>[new Command(shellPath(), args)]; 465 List<Command> commands = <Command>[new Command(shellPath(), args)];
466 if (info.hasCompileError) { 466 if (info.hasCompileError) {
467 // Do not attempt to run the compiled result. A compilation 467 // Do not attempt to run the compiled result. A compilation
468 // error should be reported by the compilation command. 468 // error should be reported by the compilation command.
469 } else if (configuration['runtime'] == 'd8') { 469 } else if (configuration['runtime'] == 'd8') {
470 var d8 = TestUtils.d8FileName(configuration); 470 var d8 = TestUtils.d8FileName(configuration);
471 commands.add(new Command(d8, ['$tempDir/out.js'])); 471 commands.add(new Command(d8, ['$tempDir/out.js']));
472 } else if (configuration['runtime'] == 'jsshell') {
473 var jsshell = TestUtils.jsshellFileName(configuration);
474 commands.add(new Command(jsshell, ['$tempDir/out.js']));
472 } 475 }
473 return commands; 476 return commands;
474 477
475 case 'dart2dart': 478 case 'dart2dart':
476 var compilerArguments = new List.from(args); 479 var compilerArguments = new List.from(args);
477 var additionalFlags = 480 var additionalFlags =
478 configuration['additional-compiler-flags'].split(' '); 481 configuration['additional-compiler-flags'].split(' ');
479 for (final flag in additionalFlags) { 482 for (final flag in additionalFlags) {
480 if (flag.isEmpty()) continue; 483 if (flag.isEmpty()) continue;
481 compilerArguments.add(flag); 484 compilerArguments.add(flag);
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
1391 args.add('--enable-checked-mode'); 1394 args.add('--enable-checked-mode');
1392 } 1395 }
1393 // args.add("--verbose"); 1396 // args.add("--verbose");
1394 if (!isBrowserRuntime(configuration['runtime'])) { 1397 if (!isBrowserRuntime(configuration['runtime'])) {
1395 args.add("--allow-mock-compilation"); 1398 args.add("--allow-mock-compilation");
1396 } 1399 }
1397 } 1400 }
1398 return args; 1401 return args;
1399 } 1402 }
1400 1403
1404 static String jsshellFileName(Map configuration) {
1405 var executableSuffix = executableSuffix('jsshell');
1406 var executable = 'jsshell$executableSuffix';
1407 var jsshellDir = '${dartDir()}/tools/testing/bin';
1408 return '$jsshellDir/$executable';
1409 }
1410
1401 static bool isBrowserRuntime(String runtime) => Contains( 1411 static bool isBrowserRuntime(String runtime) => Contains(
1402 runtime, 1412 runtime,
1403 const <String>['drt', 1413 const <String>['drt',
1404 'dartium', 1414 'dartium',
1405 'ie', 1415 'ie',
1406 'safari', 1416 'safari',
1407 'opera', 1417 'opera',
1408 'chrome', 1418 'chrome',
1409 'ff']); 1419 'ff']);
1420
1421 static bool isJsCommandLineRuntime(String runtime) =>
1422 Contains(runtime, const <String>['d8', 'jsshell']);
1423
1410 } 1424 }
1411 1425
1412 class SummaryReport { 1426 class SummaryReport {
1413 static int total = 0; 1427 static int total = 0;
1414 static int skipped = 0; 1428 static int skipped = 0;
1415 static int noCrash = 0; 1429 static int noCrash = 0;
1416 static int pass = 0; 1430 static int pass = 0;
1417 static int failOk = 0; 1431 static int failOk = 0;
1418 static int fail = 0; 1432 static int fail = 0;
1419 static int crash = 0; 1433 static int crash = 0;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1453 * $noCrash tests are expected to be flaky but not crash 1467 * $noCrash tests are expected to be flaky but not crash
1454 * $pass tests are expected to pass 1468 * $pass tests are expected to pass
1455 * $failOk tests are expected to fail that we won't fix 1469 * $failOk tests are expected to fail that we won't fix
1456 * $fail tests are expected to fail that we should fix 1470 * $fail tests are expected to fail that we should fix
1457 * $crash tests are expected to crash that we should fix 1471 * $crash tests are expected to crash that we should fix
1458 * $timeout tests are allowed to timeout 1472 * $timeout tests are allowed to timeout
1459 """; 1473 """;
1460 print(report); 1474 print(report);
1461 } 1475 }
1462 } 1476 }
OLDNEW
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698