Skip to content

Commit

Permalink
Use Fasta scanner when running analyzer.
Browse files Browse the repository at this point in the history
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2925823002 .
  • Loading branch information
peter-ahe-google committed Jun 6, 2017
1 parent 0357279 commit 74b037f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 7 additions & 2 deletions pkg/testing/lib/src/analyze.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'dart:convert' show LineSplitter, UTF8;
import 'dart:io'
show Directory, File, FileSystemEntity, Platform, Process, ProcessResult;

import '../testing.dart' show startDart;
import '../testing.dart' show dartArguments, startDart;

import 'log.dart' show isVerbose, splitLines;

Expand Down Expand Up @@ -221,7 +221,12 @@ Future<Null> analyzeUris(
print("Running dartanalyzer.");
}
Stopwatch sw = new Stopwatch()..start();
Process process = await startDart(analyzer, const <String>["--batch"]);
Process process = await startDart(
analyzer,
const <String>["--batch"],
dartArguments
..remove("-c")
..add("-DuseFastaScanner=true"));
process.stdin.writeln(arguments.join(" "));
process.stdin.close();

Expand Down
3 changes: 2 additions & 1 deletion pkg/testing/lib/src/discover.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ final Uri dartSdk = computeDartSdk();

/// Common arguments when running a dart program. Returns a copy that can
/// safely be modified by caller.
List<String> get dartArguments => <String>["-c", "--packages=$packageConfig"];
List<String> get dartArguments =>
<String>["-c", "--packages=${packageConfig.toFilePath()}"];

Stream<TestDescription> listTests(List<Uri> testRoots, {Pattern pattern}) {
StreamController<TestDescription> controller =
Expand Down

0 comments on commit 74b037f

Please sign in to comment.