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

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

Issue 2549793002: Add 'self_check' runtime for running self-checking unit tests (Closed)
Patch Set: Address comments Created 4 years 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 | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_suite.dart
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index 4fed64fec78fcd1efe2f3afdad1501e3fed98066..47b8a8791b67dcf9e333f435677375bbb708a3c2 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -123,6 +123,7 @@ abstract class TestSuite {
// This function is set by subclasses before enqueueing starts.
Function doTest;
Map<String, String> _environmentOverrides;
+ RuntimeConfiguration runtimeConfiguration;
TestSuite(this.configuration, this.suiteName) {
TestUtils.buildDir(configuration); // Sets configuration_directory.
@@ -131,6 +132,7 @@ abstract class TestSuite {
'DART_CONFIGURATION': configuration['configuration_directory']
};
}
+ runtimeConfiguration = new RuntimeConfiguration(configuration);
}
Map<String, String> get environmentOverrides => _environmentOverrides;
@@ -293,6 +295,9 @@ abstract class TestSuite {
// - test if the selector matches
// and will enqueue the test (if necessary).
void enqueueNewTestCase(TestCase testCase) {
+ if (testCase.isNegative && runtimeConfiguration.shouldSkipNegativeTests) {
+ return;
+ }
var expectations = testCase.expectedOutcomes;
// Handle sharding based on the original test path (i.e. all multitests
@@ -1095,7 +1100,9 @@ class StandardTestSuite extends TestSuite {
CommandBuilder.instance,
compileTimeArguments,
environmentOverrides);
- commands.addAll(compilationArtifact.commands);
+ if (!configuration['skip-compilation']) {
+ commands.addAll(compilationArtifact.commands);
+ }
if (expectCompileError(info) && compilerConfiguration.hasCompiler) {
// Do not attempt to run the compiled result. A compilation
@@ -1103,8 +1110,6 @@ class StandardTestSuite extends TestSuite {
return commands;
}
- RuntimeConfiguration runtimeConfiguration =
- new RuntimeConfiguration(configuration);
List<String> runtimeArguments =
compilerConfiguration.computeRuntimeArguments(
runtimeConfiguration,
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698