Skip to content

Commit

Permalink
Enable flutter plugin test (#1866)
Browse files Browse the repository at this point in the history
* Enable flutter plugin test

* Plugin makes flutter check take longer again

* Add workaround for #1431 and use update-packages to make sure Flutter is ready to go before building docs

* flag in wrong place

* dartfmt
  • Loading branch information
jcollins-g committed Dec 12, 2018
1 parent ca8fe9d commit 62aad41
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ dart:
- stable
- "dev/raw/latest"
env:
- DARTDOC_BOT=flutter
- DARTDOC_BOT=sdk-analyzer
- DARTDOC_BOT=main
- DARTDOC_BOT=flutter
- DARTDOC_BOT=packages
- DARTDOC_BOT=sdk-docs
script: ./tool/travis.sh
Expand Down
4 changes: 1 addition & 3 deletions test/compare_output_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ void main() {
'Top level package requires Flutter but FLUTTER_ROOT environment variable not set|test_package_flutter_plugin requires the Flutter SDK, version solving failed')));
expect(result.stderr, isNot(contains('asynchronous gap')));
expect(result.exitCode, isNot(0));
},
skip:
true /* TODO(gspencer): Re-enable as soon as Flutter's config is sane again. */);
});

test("Validate --version works", () async {
var args = <String>[dartdocBin, '--version'];
Expand Down
1 change: 1 addition & 0 deletions testing/test_package_flutter_plugin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
android/**
10 changes: 8 additions & 2 deletions tool/grind.dart
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,7 @@ Future<void> serveFlutterDocs() async {
}

@Task('Validate flutter docs')
// TODO(jcollins-g): add buildDartdocFlutterPluginDocs once passing
@Depends(buildFlutterDocs)
@Depends(buildFlutterDocs, buildDartdocFlutterPluginDocs)
void validateFlutterDocs() {}

@Task('Build flutter docs')
Expand Down Expand Up @@ -641,6 +640,11 @@ class FlutterRepo {
['precache'],
workingDirectory: flutterPath,
);
await launcher.runStreamed(
bin,
['update-packages'],
workingDirectory: flutterPath,
);
}

factory FlutterRepo.fromPath(String flutterPath, Map<String, String> env,
Expand Down Expand Up @@ -924,6 +928,8 @@ Future<WarningsCollection> _buildDartdocFlutterPluginDocs() async {
[
'--enable-asserts',
pathLib.join(Directory.current.path, 'bin', 'dartdoc.dart'),
'--exclude-packages',
'Dart', // TODO(jcollins-g): dart-lang/dartdoc#1431
'--json',
'--link-to-remote',
'--output',
Expand Down

0 comments on commit 62aad41

Please sign in to comment.