Skip to content

Commit

Permalink
Run both regular and --watch analysis on Travis (flutter#8913)
Browse files Browse the repository at this point in the history
We keep breaking --watch because we don't test it.
  • Loading branch information
Hixie authored Mar 20, 2017
1 parent 8aa4314 commit 11c2032
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions dev/bots/test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ String flutterTestArgs = Platform.environment['FLUTTER_TEST_ARGS'];
/// arguments to flutter test. For example, you might want to call this
/// script using FLUTTER_TEST_ARGS=--local-engine=host_debug_unopt to
/// use your own build of the engine.
///
/// To run the analysis part, run it with SHARD=analyze
///
/// For example:
/// SHARD=analyze bin/cache/dart-sdk/bin/dart dev/bots/test.dart
/// FLUTTER_TEST_ARGS=--local-engine=host_debug_unopt bin/cache/dart-sdk/bin/dart dev/bots/test.dart
Future<Null> main() async {
if (Platform.environment['SHARD'] == 'docs') {
print('\x1B[32mDONE: test.dart does nothing in the docs shard.\x1B[0m');
Expand All @@ -22,6 +28,13 @@ Future<Null> main() async {
options: <String>['--flutter-repo'],
);

// Try with the --watch analyzer, to make sure it returns success also.
// The --benchmark argument exits after one run.
await _runFlutterAnalyze(flutterRoot,
options: <String>['--flutter-repo', '--watch', '--benchmark'],
);

// Try an analysis against a big version of the gallery.
await _runCmd(dart, <String>[p.join(flutterRoot, 'dev', 'tools', 'mega_gallery.dart')],
workingDirectory: flutterRoot,
);
Expand Down

0 comments on commit 11c2032

Please sign in to comment.