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

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

Issue 9178022: Fix test.dart to have the same behavior as test.py for --frog and --froglib. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/testing/dart/test_options.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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 } 437 }
438 compilerArgs.addAll(vmOptions); 438 compilerArgs.addAll(vmOptions);
439 compilerArgs.add('--ignore-unrecognized-flags'); 439 compilerArgs.add('--ignore-unrecognized-flags');
440 compilerArgs.add('--out'); 440 compilerArgs.add('--out');
441 compilerArgs.add(compiledDartWrapperFilename); 441 compilerArgs.add(compiledDartWrapperFilename);
442 compilerArgs.add(dartWrapperFilename); 442 compilerArgs.add(dartWrapperFilename);
443 // TODO(whesse): Add --fatal-type-errors if needed. 443 // TODO(whesse): Add --fatal-type-errors if needed.
444 break; 444 break;
445 case 'frogium': 445 case 'frogium':
446 case 'webdriver': 446 case 'webdriver':
447 compilerArgs.addAll(['--libdir=$dartDir/frog/lib', 447 String libdir = configuration['froglib'];
448 if (libdir == '') {
449 libdir = '$dartDir/frog/lib';
450 }
451 compilerArgs.addAll(['--libdir=$libdir',
448 '--compile-only', 452 '--compile-only',
449 '--out=$compiledDartWrapperFilename']); 453 '--out=$compiledDartWrapperFilename']);
450 compilerArgs.addAll(vmOptions); 454 compilerArgs.addAll(vmOptions);
451 compilerArgs.add(dartWrapperFilename); 455 compilerArgs.add(dartWrapperFilename);
452 break; 456 break;
453 case 'dartium': 457 case 'dartium':
454 // No compilation phase. 458 // No compilation phase.
455 compilerExecutable = null; 459 compilerExecutable = null;
456 compilerArgs = null; 460 compilerArgs = null;
457 break; 461 break;
458 default: 462 default:
459 Expect.fail('unimplemented component $component'); 463 Expect.fail('unimplemented component $component');
460 } 464 }
461 465
462 String executable = getFilename(dumpRenderTreeFilename); 466 String executable = getFilename(dumpRenderTreeFilename);
463 List<String> args; 467 List<String> args;
464 if (component == 'webdriver') { 468 if (component == 'webdriver') {
469 // TODO(efortuna): These paths are not OS independent!
465 executable = '$dartDir/tools/testing/run_selenium.py'; 470 executable = '$dartDir/tools/testing/run_selenium.py';
466 args = ['--out', htmlPath, '--browser', configuration['browser']]; 471 args = ['--out', htmlPath, '--browser', configuration['browser']];
467 } else { 472 } else {
468 args = ['--no-timeout']; 473 args = ['--no-timeout'];
469 if (component == 'dartium') { 474 if (component == 'dartium') {
470 var dartFlags = ['--enable_asserts', 475 var dartFlags = ['--enable_asserts',
471 '--enable_type_checks', 476 '--enable_type_checks',
472 '--ignore-unrecognized-flags']; 477 '--ignore-unrecognized-flags'];
473 dartFlags.addAll(vmOptions); 478 dartFlags.addAll(vmOptions);
474 args.add('--dart-flags=${Strings.join(dartFlags, " ")}'); 479 args.add('--dart-flags=${Strings.join(dartFlags, " ")}');
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 if (!(new File(name)).existsSync()) { 926 if (!(new File(name)).existsSync()) {
922 throw "Executable '$name' does not exist"; 927 throw "Executable '$name' does not exist";
923 } 928 }
924 return name; 929 return name;
925 } 930 }
926 931
927 static String compilerPath(Map configuration) { 932 static String compilerPath(Map configuration) {
928 if (configuration['component'] == 'dartium') { 933 if (configuration['component'] == 'dartium') {
929 return null; // No separate compiler for dartium tests. 934 return null; // No separate compiler for dartium tests.
930 } 935 }
931 var name = '${buildDir(configuration)}/${compilerName(configuration)}'; 936 var name = configuration['frog'];
Bill Hesse 2012/01/19 16:31:28 I don't think we want --frog to override the dartc
937 if (name == '') {
938 name = '${buildDir(configuration)}/${compilerName(configuration)}';
939 }
932 if (!(new File(name)).existsSync()) { 940 if (!(new File(name)).existsSync()) {
933 throw "Executable '$name' does not exist"; 941 throw "Executable '$name' does not exist";
934 } 942 }
935 return name; 943 return name;
936 } 944 }
937 945
938 static String outputDir(Map configuration) { 946 static String outputDir(Map configuration) {
939 var outputDir = ''; 947 var outputDir = '';
940 var system = configuration['system']; 948 var system = configuration['system'];
941 if (system == 'linux') { 949 if (system == 'linux') {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 * $noCrash tests are expected to be flaky but not crash 1024 * $noCrash tests are expected to be flaky but not crash
1017 * $pass tests are expected to pass 1025 * $pass tests are expected to pass
1018 * $failOk tests are expected to fail that we won't fix 1026 * $failOk tests are expected to fail that we won't fix
1019 * $fail tests are expected to fail that we should fix 1027 * $fail tests are expected to fail that we should fix
1020 * $crash tests are expected to crash that we should fix 1028 * $crash tests are expected to crash that we should fix
1021 * $timeout tests are allowed to timeout 1029 * $timeout tests are allowed to timeout
1022 """; 1030 """;
1023 print(report); 1031 print(report);
1024 } 1032 }
1025 } 1033 }
OLDNEW
« no previous file with comments | « tools/testing/dart/test_options.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698