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

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

Issue 19483008: Add support for passing in vm options to the testing script. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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
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 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1460 "numStaticTypeAnnotations": numStaticTypeAnnotations, 1460 "numStaticTypeAnnotations": numStaticTypeAnnotations,
1461 "numCompileTimeAnnotations": numCompileTimeAnnotations }; 1461 "numCompileTimeAnnotations": numCompileTimeAnnotations };
1462 } 1462 }
1463 1463
1464 List<List<String>> getVmOptions(Map optionsFromFile) { 1464 List<List<String>> getVmOptions(Map optionsFromFile) {
1465 var COMPILERS = const ['none', 'dart2dart']; 1465 var COMPILERS = const ['none', 'dart2dart'];
1466 var RUNTIMES = const ['none', 'vm', 'drt', 'dartium']; 1466 var RUNTIMES = const ['none', 'vm', 'drt', 'dartium'];
1467 var needsVmOptions = COMPILERS.contains(configuration['compiler']) && 1467 var needsVmOptions = COMPILERS.contains(configuration['compiler']) &&
1468 RUNTIMES.contains(configuration['runtime']); 1468 RUNTIMES.contains(configuration['runtime']);
1469 if (!needsVmOptions) return [[]]; 1469 if (!needsVmOptions) return [[]];
1470 final vmOptions = optionsFromFile['vmOptions']; 1470 var vmOptions = new List.from(optionsFromFile['vmOptions']);
1471 // Add general vm options that is given to the testing script.
kustermann 2013/07/23 13:55:18 "that is given" -> "that were given"
ricow1 2013/07/24 11:32:50 Done.
1472 if (configuration['vm-options'] != null) {
1473 for (var list in vmOptions) {
1474 list.addAll(configuration['vm-options'].split(" "));
kustermann 2013/07/23 13:55:18 Make sure we don't add empty options (i.e. conside
ricow1 2013/07/24 11:32:50 Done.
1475 }
1476 }
kustermann 2013/07/23 13:55:18 This change is not going to work. I think this fun
ricow1 2013/07/24 11:32:50 Done.
1471 if (configuration['compiler'] != 'dart2dart') return vmOptions; 1477 if (configuration['compiler'] != 'dart2dart') return vmOptions;
1472 // Temporary workaround for race in test suite: tests with different 1478 // Temporary workaround for race in test suite: tests with different
1473 // vm options are still compiled into the same output file which 1479 // vm options are still compiled into the same output file which
1474 // may lead to reads from empty files. 1480 // may lead to reads from empty files.
1475 return [vmOptions[0]]; 1481 return [vmOptions[0]];
1476 } 1482 }
1477 1483
1478 /** 1484 /**
1479 * Read options from a co19 test file. 1485 * Read options from a co19 test file.
1480 * 1486 *
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1966 * $pass tests are expected to pass 1972 * $pass tests are expected to pass
1967 * $failOk tests are expected to fail that we won't fix 1973 * $failOk tests are expected to fail that we won't fix
1968 * $fail tests are expected to fail that we should fix 1974 * $fail tests are expected to fail that we should fix
1969 * $crash tests are expected to crash that we should fix 1975 * $crash tests are expected to crash that we should fix
1970 * $timeout tests are allowed to timeout 1976 * $timeout tests are allowed to timeout
1971 * $compileErrorSkip tests are skipped on browsers due to compile-time error 1977 * $compileErrorSkip tests are skipped on browsers due to compile-time error
1972 """; 1978 """;
1973 print(report); 1979 print(report);
1974 } 1980 }
1975 } 1981 }
OLDNEW
« tools/testing/dart/test_options.dart ('K') | « tools/testing/dart/test_options.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698