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

Unified Diff: tools/test.dart

Issue 527053002: Support passing in a test suite directory through a flag to the testing scripts (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/testing/dart/test_options.dart » ('j') | tools/testing/dart/test_suite.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/test.dart
===================================================================
--- tools/test.dart (revision 39722)
+++ tools/test.dart (working copy)
@@ -175,42 +175,56 @@
maxBrowserProcesses = math.max(1, maxBrowserProcesses ~/ 2);
}
- for (String key in selectors.keys) {
- if (key == 'co19') {
- testSuites.add(new Co19TestSuite(conf));
- } else if (conf['compiler'] == 'none' &&
- conf['runtime'] == 'vm' &&
- key == 'vm') {
- // vm tests contain both cc tests (added here) and dart tests (added
- // in [TEST_SUITE_DIRECTORIES]).
- testSuites.add(new VMTestSuite(conf));
- } else if (conf['analyzer']) {
- if (key == 'analyze_library') {
- testSuites.add(new AnalyzeLibraryTestSuite(conf));
+ // If we specifically pass in a suite only run that.
+ if (conf['suite_dir'] != null) {
+ var suite_path = new Path(conf['suite_dir']);
+
+ // Add a selector if we did not specify a specific one
+ if (conf['default_selector'] != null) {
+ var regexp = new RegExp('.?');
+ conf['selectors'][suite_path.filename] = regexp;
+ }
+ testSuites.add(
+ new StandardTestSuite.forDirectory(conf, suite_path));
+ } else {
+ for (String key in selectors.keys) {
ricow1 2014/09/01 13:00:48 this and below is just verbatim indented copy of t
+ if (key == 'co19') {
+ testSuites.add(new Co19TestSuite(conf));
+ } else if (conf['compiler'] == 'none' &&
+ conf['runtime'] == 'vm' &&
+ key == 'vm') {
+ // vm tests contain both cc tests (added here) and dart tests (added
+ // in [TEST_SUITE_DIRECTORIES]).
+ testSuites.add(new VMTestSuite(conf));
+ } else if (conf['analyzer']) {
+ if (key == 'analyze_library') {
+ testSuites.add(new AnalyzeLibraryTestSuite(conf));
+ }
+ } else if (conf['compiler'] == 'none' &&
+ conf['runtime'] == 'vm' &&
+ key == 'pkgbuild') {
+ if (!conf['use_repository_packages'] &&
+ !conf['use_public_packages']) {
+ print("You need to use either --use-repository-packages or "
+ "--use-public-packages with the pkgbuild test suite!");
+ exit(1);
+ }
+ if (!conf['use_sdk']) {
+ print("Running the 'pkgbuild' test suite requires "
+ "passing the '--use-sdk' to test.py");
+ exit(1);
+ }
+ testSuites.add(
+ new PkgBuildTestSuite(conf, 'pkgbuild', 'pkg/pkgbuild.status'));
}
- } else if (conf['compiler'] == 'none' &&
- conf['runtime'] == 'vm' &&
- key == 'pkgbuild') {
- if (!conf['use_repository_packages'] && !conf['use_public_packages']) {
- print("You need to use either --use-repository-packages or "
- "--use-public-packages with the pkgbuild test suite!");
- exit(1);
- }
- if (!conf['use_sdk']) {
- print("Running the 'pkgbuild' test suite requires "
- "passing the '--use-sdk' to test.py");
- exit(1);
- }
- testSuites.add(
- new PkgBuildTestSuite(conf, 'pkgbuild', 'pkg/pkgbuild.status'));
}
- }
- for (final testSuiteDir in TEST_SUITE_DIRECTORIES) {
- final name = testSuiteDir.filename;
- if (selectors.containsKey(name)) {
- testSuites.add(
- new StandardTestSuite.forDirectory(conf, testSuiteDir));
+ for (final testSuiteDir in TEST_SUITE_DIRECTORIES) {
+ final name = testSuiteDir.filename;
+ if (selectors.containsKey(name)) {
+ testSuites.add(
+ new StandardTestSuite.forDirectory(conf, testSuiteDir));
+ }
}
}
}
« no previous file with comments | « no previous file | tools/testing/dart/test_options.dart » ('j') | tools/testing/dart/test_suite.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698