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

Unified Diff: tools/testing/dart/test_suite.dart

Issue 645533002: Clean up test_runner Command subclass hash/equality. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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
Index: tools/testing/dart/test_suite.dart
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index a3b1dfcea78ca655b5d99d4f1c5e9b5cbd9d9202..dbbb23a1998b3cad05f0999b58acb8d3ebd27a22 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -122,16 +122,16 @@ abstract class TestSuite {
final String suiteName;
// This function is set by subclasses before enqueueing starts.
Function doTest;
+ Map<String, String> _environmentOverrides;
-
- TestSuite(this.configuration, this.suiteName);
-
- Map<String, String> get environmentOverrides {
- return {
- 'DART_CONFIGURATION' : TestUtils.configurationDir(configuration),
+ TestSuite(this.configuration, this.suiteName) {
+ _environmentOverrides = {
+ 'DART_CONFIGURATION' : TestUtils.configurationDir(configuration)
};
}
+ Map<String, String> get environmentOverrides => _environmentOverrides;
+
/**
* Whether or not binaries should be found in the root build directory or
* in the built SDK.
@@ -596,6 +596,7 @@ class StandardTestSuite extends TestSuite {
Predicate<String> isTestFilePredicate;
final bool listRecursively;
final extraVmOptions;
+ List<Uri> _dart2JsBootstrapDependencies;
StandardTestSuite(Map configuration,
String suiteName,
@@ -603,11 +604,21 @@ class StandardTestSuite extends TestSuite {
this.statusFilePaths,
{this.isTestFilePredicate,
bool recursive: false})
- : super(configuration, suiteName),
- dartDir = TestUtils.dartDir,
- listRecursively = recursive,
- suiteDir = TestUtils.dartDir.join(suiteDirectory),
- extraVmOptions = TestUtils.getExtraVmOptions(configuration);
+ : super(configuration, suiteName),
+ dartDir = TestUtils.dartDir,
+ listRecursively = recursive,
+ suiteDir = TestUtils.dartDir.join(suiteDirectory),
+ extraVmOptions = TestUtils.getExtraVmOptions(configuration) {
+ if (!useSdk) {
+ _dart2JsBootstrapDependencies = [];
+ } else {
+ var snapshotPath = TestUtils.absolutePath(new Path(buildDir).join(
+ new Path('dart-sdk/bin/snapshots/'
+ 'utils_wrapper.dart.snapshot'))).toString();
+ _dart2JsBootstrapDependencies =
+ [new Uri(scheme: 'file', path: snapshotPath)];
+ }
+ }
/**
* Creates a test suite whose file organization matches an expected structure.
@@ -651,14 +662,7 @@ class StandardTestSuite extends TestSuite {
recursive: true);
}
- List<Uri> get dart2JsBootstrapDependencies {
- if (!useSdk) return [];
-
- var snapshotPath = TestUtils.absolutePath(new Path(buildDir).join(
- new Path('dart-sdk/bin/snapshots/'
- 'utils_wrapper.dart.snapshot'))).toString();
- return [new Uri(scheme: 'file', path: snapshotPath)];
- }
+ List<Uri> get dart2JsBootstrapDependencies => _dart2JsBootstrapDependencies;
/**
* The default implementation assumes a file is a test if

Powered by Google App Engine
This is Rietveld 408576698