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

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

Issue 9155001: Use test.dart for dartc buildbot. Ensure that test.dart creates the build directory. (Closed) Base URL: https://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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/testing/dart/multitest.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #library("test_suite"); 5 #library("test_suite");
6 6
7 #import("status_file_parser.dart"); 7 #import("status_file_parser.dart");
8 #import("test_runner.dart"); 8 #import("test_runner.dart");
9 #import("multitest.dart"); 9 #import("multitest.dart");
10 10
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 browserFlag = 'safari'; 464 browserFlag = 'safari';
465 break; 465 break;
466 } 466 }
467 } 467 }
468 } 468 }
469 args = ['--out', htmlPath, '--browser', browserFlag]; 469 args = ['--out', htmlPath, '--browser', browserFlag];
470 470
471 } else { 471 } else {
472 args = ['--no-timeout']; 472 args = ['--no-timeout'];
473 if (component == 'dartium') { 473 if (component == 'dartium') {
474 var dartFlags = ['--enable_asserts', '--enable_type_checks']; 474 var dartFlags = ['--enable_asserts',
475 '--enable_type_checks',
476 '--ignore-unrecognized-flags'];
475 dartFlags.addAll(vmOptions); 477 dartFlags.addAll(vmOptions);
476 args.add('--dart-flags=${Strings.join(dartFlags, " ")}'); 478 args.add('--dart-flags=${Strings.join(dartFlags, " ")}');
477 } 479 }
478 args.add(htmlPath); 480 args.add(htmlPath);
479 } 481 }
480 // Create BrowserTestCase and queue it. 482 // Create BrowserTestCase and queue it.
481 var testCase = new BrowserTestCase( 483 var testCase = new BrowserTestCase(
482 testName, 484 testName,
483 compilerExecutable, 485 compilerExecutable,
484 compilerArgs, 486 compilerArgs,
(...skipping 20 matching lines...) Expand all
505 testUniqueName = testUniqueName.replaceAll('/', '_'); 507 testUniqueName = testUniqueName.replaceAll('/', '_');
506 // Create '[build dir]/generated_tests/$component/$testUniqueName', 508 // Create '[build dir]/generated_tests/$component/$testUniqueName',
507 // including any intermediate directories that don't exist. 509 // including any intermediate directories that don't exist.
508 var generatedTestPath = ['generated_tests', 510 var generatedTestPath = ['generated_tests',
509 configuration['component'], 511 configuration['component'],
510 testUniqueName]; 512 testUniqueName];
511 513
512 String tempDirPath = TestUtils.buildDir(configuration); 514 String tempDirPath = TestUtils.buildDir(configuration);
513 Directory tempDir = new Directory(tempDirPath); 515 Directory tempDir = new Directory(tempDirPath);
514 if (!tempDir.existsSync()) { 516 if (!tempDir.existsSync()) {
515 throw new Exception('Build directory $tempDirPath does not exist.'); 517 // Dartium tests can be run with no build step, with no output directory.
518 // This special case builds the build directory that should be there.
519 var buildPath = tempDirPath.split('/');
520 tempDirPath = buildPath[0];
521 if (tempDirPath == '') {
522 throw new Exception(
523 'Non-relative path to build directory in test_suite.dart');
524 }
525 buildPath.removeRange(0, 1);
526 if (buildPath.last() == '') buildPath.removeLast();
527 buildPath.addAll(generatedTestPath);
528 generatedTestPath = buildPath;
529 tempDir = new Directory(tempDirPath);
530 if (!tempDir.existsSync()) {
531 tempDir.createSync();
532 }
516 } 533 }
517 tempDirPath = new File(tempDirPath).fullPathSync(); 534 tempDirPath = new File(tempDirPath).fullPathSync();
518 535
519 for (String subdirectory in generatedTestPath) { 536 for (String subdirectory in generatedTestPath) {
520 tempDirPath = '$tempDirPath/$subdirectory'; 537 tempDirPath = '$tempDirPath/$subdirectory';
521 tempDir = new Directory(tempDirPath); 538 tempDir = new Directory(tempDirPath);
522 if (!tempDir.existsSync()) { 539 if (!tempDir.existsSync()) {
523 tempDir.createSync(); 540 tempDir.createSync();
524 } 541 }
525 } 542 }
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 * $noCrash tests are expected to be flaky but not crash 1013 * $noCrash tests are expected to be flaky but not crash
997 * $pass tests are expected to pass 1014 * $pass tests are expected to pass
998 * $failOk tests are expected to fail that we won't fix 1015 * $failOk tests are expected to fail that we won't fix
999 * $fail tests are expected to fail that we should fix 1016 * $fail tests are expected to fail that we should fix
1000 * $crash tests are expected to crash that we should fix 1017 * $crash tests are expected to crash that we should fix
1001 * $timeout tests are allowed to timeout\ 1018 * $timeout tests are allowed to timeout\
1002 """; 1019 """;
1003 print(report); 1020 print(report);
1004 } 1021 }
1005 } 1022 }
OLDNEW
« no previous file with comments | « tools/testing/dart/multitest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698