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

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

Issue 10343008: reenable some dartc tests that have been disabled accidentally. Move (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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
« tools/test.dart ('K') | « tools/test.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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 if (start > testsStart) { 362 if (start > testsStart) {
363 // TODO(sigmund): delete this branch once all tests stop using the src/ 363 // TODO(sigmund): delete this branch once all tests stop using the src/
364 // directory 364 // directory
365 testName = filename.substring(start + 4, filename.length - 5); 365 testName = filename.substring(start + 4, filename.length - 5);
366 } else if (optionsFromFile['isMultitest']) { 366 } else if (optionsFromFile['isMultitest']) {
367 start = filename.lastIndexOf('/'); 367 start = filename.lastIndexOf('/');
368 int middle = filename.lastIndexOf('_'); 368 int middle = filename.lastIndexOf('_');
369 testName = filename.substring(start + 1, middle) + '/' + 369 testName = filename.substring(start + 1, middle) + '/' +
370 filename.substring(middle + 1, filename.length - 5); 370 filename.substring(middle + 1, filename.length - 5);
371 } else { 371 } else {
372 // This case is hit by the dartc client compilation 372 // This branch is hit in two cases: standard test suites created with
373 // tests. These tests are pretty broken compared to the 373 // forDirectory and dartc code compilation tests.
374
375 // Dartc compilation tests are pretty broken compared to the
374 // rest. They use the .dart suffix in the status files. They 376 // rest. They use the .dart suffix in the status files. They
375 // find tests in weird ways (testing that they contain "#"). 377 // find tests in weird ways (testing that they contain "#").
376 // They need to be redone. 378 // They need to be redone.
377 // TODO(1058): This does not work on Windows. 379 // TODO(1058): This does not work on Windows.
378 start = filename.indexOf(directoryPath); 380 start = filename.indexOf(directoryPath);
379 if (start != -1) { 381 if (start != -1) {
380 testName = filename.substring(start + directoryPath.length + 1); 382 testName = filename.substring(start + directoryPath.length + 1);
381 } else { 383 } else {
382 testName = filename; 384 testName = filename;
Bill Hesse 2012/05/03 14:44:04 I don't like the possibility that we might hit thi
Siggi Cherem (dart-lang) 2012/05/04 23:51:24 maybe we can split the dartc vs non-dartc cases up
383 } 385 }
384 386
385 if (configuration['compiler'] != 'dartc' || 387 if (configuration['compiler'] != 'dartc' ||
386 testName.endsWith('_test.dart')) { 388 testName.endsWith('_test.dart')) {
387 if (testName.endsWith('.dart')) { 389 if (testName.endsWith('.dart')) {
388 testName = testName.substring(0, testName.length - 5); 390 testName = testName.substring(0, testName.length - 5);
389 } 391 }
390 } 392 }
391 } 393 }
392 int shards = configuration['shards']; 394 int shards = configuration['shards'];
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 void createTest(successIgnored) { 1142 void createTest(successIgnored) {
1141 var sdkDir = "$buildDir/dart-sdk".trim(); 1143 var sdkDir = "$buildDir/dart-sdk".trim();
1142 List<String> args = <String>[ 1144 List<String> args = <String>[
1143 '-ea', 1145 '-ea',
1144 '-classpath', classPath, 1146 '-classpath', classPath,
1145 '-Dcom.google.dart.sdk=$sdkDir', 1147 '-Dcom.google.dart.sdk=$sdkDir',
1146 '-Dcom.google.dart.corelib.SharedTests.test_py=' + 1148 '-Dcom.google.dart.corelib.SharedTests.test_py=' +
1147 dartDir + '/tools/test.py', 1149 dartDir + '/tools/test.py',
1148 'org.junit.runner.JUnitCore']; 1150 'org.junit.runner.JUnitCore'];
1149 args.addAll(testClasses); 1151 args.addAll(testClasses);
1150 1152
1151 // Lengthen the timeout for JUnit tests. It is normal for them 1153 // Lengthen the timeout for JUnit tests. It is normal for them
1152 // to run for a few minutes. 1154 // to run for a few minutes.
1153 Map updatedConfiguration = new Map(); 1155 Map updatedConfiguration = new Map();
1154 configuration.forEach((key, value) { 1156 configuration.forEach((key, value) {
1155 updatedConfiguration[key] = value; 1157 updatedConfiguration[key] = value;
1156 }); 1158 });
1157 updatedConfiguration['timeout'] *= 2; 1159 updatedConfiguration['timeout'] *= 2;
1158 doTest(new TestCase(suiteName, 1160 doTest(new TestCase(suiteName,
1159 [new Command('java', args)], 1161 [new Command('java', args)],
1160 updatedConfiguration, 1162 updatedConfiguration,
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1397 * $noCrash tests are expected to be flaky but not crash 1399 * $noCrash tests are expected to be flaky but not crash
1398 * $pass tests are expected to pass 1400 * $pass tests are expected to pass
1399 * $failOk tests are expected to fail that we won't fix 1401 * $failOk tests are expected to fail that we won't fix
1400 * $fail tests are expected to fail that we should fix 1402 * $fail tests are expected to fail that we should fix
1401 * $crash tests are expected to crash that we should fix 1403 * $crash tests are expected to crash that we should fix
1402 * $timeout tests are allowed to timeout 1404 * $timeout tests are allowed to timeout
1403 """; 1405 """;
1404 print(report); 1406 print(report);
1405 } 1407 }
1406 } 1408 }
OLDNEW
« tools/test.dart ('K') | « tools/test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698