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

Unified Diff: tests/compiler/dart2js/serialization/analysis_test.dart

Issue 2096423002: Split long-running serialization tests to avoid timeouts (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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: tests/compiler/dart2js/serialization/analysis_test.dart
diff --git a/tests/compiler/dart2js/serialization/analysis_test.dart b/tests/compiler/dart2js/serialization/analysis_test.dart
deleted file mode 100644
index 152972bd7cc726e2ce63ee9af167e77fff6ee8e1..0000000000000000000000000000000000000000
--- a/tests/compiler/dart2js/serialization/analysis_test.dart
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library dart2js.serialization_analysis_test;
-
-import 'dart:async';
-import 'package:async_helper/async_helper.dart';
-import 'package:expect/expect.dart';
-import 'package:compiler/src/commandline_options.dart';
-import 'package:compiler/src/compiler.dart';
-import 'package:compiler/src/filenames.dart';
-import '../memory_compiler.dart';
-import 'helper.dart';
-import 'test_data.dart';
-
-main(List<String> args) {
- asyncTest(() async {
- Arguments arguments = new Arguments.from(args);
- SerializedData serializedData =
- await serializeDartCore(arguments: arguments);
- if (arguments.filename != null) {
- Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.filename));
- await analyze(entryPoint,
- resolutionInputs: serializedData.toUris(),
- sourceFiles: serializedData.toMemorySourceFiles());
- } else {
- await arguments.forEachTest(serializedData, TESTS, analyze);
- }
- });
-}
-
-Future analyze(
- Uri entryPoint,
- {Map<String, String> sourceFiles: const <String, String>{},
- List<Uri> resolutionInputs,
- int index,
- Test test,
- bool verbose: false}) async {
- String testDescription = test != null ? test.name : '${entryPoint}';
- String id = index != null ? '$index: ' : '';
- print('------------------------------------------------------------------');
- print('analyze ${id}${testDescription}');
- print('------------------------------------------------------------------');
- DiagnosticCollector diagnosticCollector = new DiagnosticCollector();
- await runCompiler(
- entryPoint: entryPoint,
- resolutionInputs: resolutionInputs,
- memorySourceFiles: sourceFiles,
- options: [Flags.analyzeOnly],
- diagnosticHandler: diagnosticCollector);
- if (test != null) {
- Expect.equals(test.expectedErrorCount, diagnosticCollector.errors.length,
- "Unexpected error count.");
- Expect.equals(
- test.expectedWarningCount,
- diagnosticCollector.warnings.length,
- "Unexpected warning count.");
- Expect.equals(test.expectedHintCount, diagnosticCollector.hints.length,
- "Unexpected hint count.");
- Expect.equals(test.expectedInfoCount, diagnosticCollector.infos.length,
- "Unexpected info count.");
- }
-}
-

Powered by Google App Engine
This is Rietveld 408576698