Commit Graph

569 Commits

Author SHA1 Message Date
godofredoc
fd0e223b74
Add Firebase tests to flutter dashboard. (#66677)
This PR also enables firebase tests on presubmit and removes code that
won't be used anymore from test runner.

Bug:
  https://github.com/flutter/infra/pull/225
2020-09-25 14:26:39 -07:00
godofredoc
cfe53fd3c5
Enable linux and win hostonly devicelab tests. (#66085) 2020-09-21 11:27:06 -07:00
Jonah Williams
b88f308af7
[flutter_tools] port deprecated settings test to flutter integration shard (#65806)
Port the deprecated settings devicelab test to tool integration shard. Tests that apps can be built using the deprecated android/settings.gradle file.

Part of #65790
2020-09-15 10:55:07 -07:00
Jonah Williams
4e20f00053
[ci] remove create offline tests (#65791)
Currently these tests are taking CI time without providing any value, because there is no verification that network connectivity is avoided. This is better covered by a unit test that verifies that --offline is passed to pub.
2020-09-14 17:54:59 -07:00
Greg Spencer
94592acb71
Creates a way to test private APIs in the Flutter package. (#65505) 2020-09-13 15:52:03 -07:00
Jonah Williams
3f6c862177
[null-safety] remove sound-null-safety by default, remove experiment flag (#64594)
To allow tests to begin migrating to null safety, sound null safety needs to be disabled. Also removes the experiment flag that is unnecessary since the framework is on the SDK allowlist.
2020-08-25 15:57:54 -07:00
Mouad Debbar
707f995de3
[web] Fix and enable editable_text_test.dart (#64516) 2020-08-25 04:51:03 -07:00
Jonah Williams
69fd5c50a2
[flutter_tools] null assertions off by default for web (#64186)
Like Android/iOS, only enable --null-assertions if asked. Previously this was enabled by default for web, but in general this has proved to be too breaking to enable by default.

#61042
2020-08-19 14:52:47 -07:00
Jonah Williams
38e0c25823
[flutter_tools] reland: enable --null-assertions for flutter framework tests (#64120)
Reland of acdb909 with fixes to semantics.dart

#61042
2020-08-19 13:25:42 -07:00
Jenn Magder
1b47759528
Revert "[null-safety] enable null assertions for framework tests (#64071)" (#64118)
This reverts commit acdb909fcb.
2020-08-18 18:08:51 -07:00
Jonah Williams
acdb909fcb
[null-safety] enable null assertions for framework tests (#64071) 2020-08-18 17:21:04 -07:00
Jenn Magder
0fe1adadd2
Pin iOS module test plugin versions (#63445) 2020-08-11 06:26:05 -07:00
Jenn Magder
31dfaa0c7e
Temporarily turn off module_test_ios during investigation (#63448) 2020-08-10 19:08:35 -07:00
Jonah Williams
e762e7e05f
[flutter_tools] deflake integration tests by running single isolate (#62534)
There are some occasional difficult to repro flakes on the tool integration tests. Try running only a single isolate to simplify the environment a bit.
2020-07-30 11:06:34 -07:00
Jason Simmons
e64fe11542
Manual engine roll to 626244a72c5d53cc6d00c840987f9059faed511a (#62163)
Disabled web_benchmarks_canvaskit in the bot scripts because it was
failing in the Cirrus environment.
2020-07-23 18:11:17 -07:00
Jonah Williams
cb7770b3a5
[flutter_tools] add support for enable null safety asserts (#61114)
Enable null safety asserts for web debug mode. This induces runtime asserts at the boundaries between null safe and non-null safe libraries. Adds integration test that validates assertion error is thrown.

#61042
2020-07-15 09:54:39 -07:00
Jenn Magder
1e510ff636
Turn on add-to-app iOS platform unit tests (#61007) 2020-07-09 15:52:49 -07:00
Jonah Williams
80b5ee4e7c
Roll tester (#61128)
landing to unblock meta rollback
2020-07-08 14:39:55 -07:00
Jonah Williams
de205ec13c
Roll tester version (#60668)
Includes a fix to a startup race condition and log truncation that should make sure strings aren't cut off
2020-07-06 10:36:05 -07:00
Jonah Williams
f2f48df3af
Experiment with tester on the flutter_tools general shard (#60490)
Use tester (disclaimer, written by me) to unit test the flutter tools general shard. Since these tests are designed to be hermetic, the single compilation/single isolate model offers a tremendous speedup over the default pub run test workflow. On previous linux shard, test execution alone took 10:30, while now it takes only 1:30.
2020-06-29 22:19:55 -07:00
Jenn Magder
6a2bc2617e
Replace ANDROID_HOME user messages with ANDROID_SDK_ROOT (#59867) 2020-06-22 18:43:04 -07:00
Jonah Williams
958f7c5b55
[flutter_tools] ensure generated entrypoint matches test and web entrypoint language version (#59291)
Ensure that the language version of the test/web generated entrypoint matches the language version of the test file to run, or the overall package language version if no annotation is provided.
2020-06-16 09:17:12 -07:00
Michael Goderbauer
584fd5f913
Word substitutions (#59484)
* Word substitutions

* ++
2020-06-16 09:15:43 -07:00
Alexandre Ardhuin
65ef1f94bb
test flutter framework with null-safety (#59280) 2020-06-11 16:40:02 -07:00
Jenn Magder
9037ccd355
Add per-test timeout to Cirrus tool general tests (#58649) 2020-06-09 12:38:01 -07:00
Jonah Williams
b1d75fc99d
[flutter_tools] add flag for sound-null-safety, unify with experiments (#58533)
Also combines experiments into extraGenSnapshot/ExtraFrontEndOptions. Allows providing --no-sound-null-safety to allow out of order migration and running.
2020-06-03 21:02:07 -07:00
Jonah Williams
01b9bf8ea6
[flutter_tools] deprecate flutter generate and codegen (#58328) 2020-06-03 09:28:02 -07:00
Jonah Williams
6bd156b8ed
[null-safety] disable tests until framework has migrated (#57235) 2020-05-14 12:34:53 -07:00
Jonah Williams
3ccb160da3
[flutter_tools] re-enable non-nullable test (#57075) 2020-05-13 09:32:03 -07:00
Jenn Magder
fab03bd1e2
Shard Cirrus build_tests (#56735) 2020-05-11 12:49:18 -07:00
Jenn Magder
3cb04ff9aa
Shard firebase_test_lab_tests (#56594) 2020-05-08 16:32:17 -07:00
Dan Field
22239f4183
Test engine version hash, but skip for Dart HHH bot (#55223) 2020-05-04 11:19:02 -07:00
Jonah Williams
2a5690f097
[flutter_tools] fix iOS build inconsistencies and pipe through performance file (#56094)
Ensure iOS and android builds can be correctly cached. Use the performance-measurement-file to verify that all targets were skipped on the second invocation. This is only run on the flutter_gallery build.
2020-05-01 15:34:28 -07:00
Jonah Williams
f7ad30b777
Temporarily disable nnbd flutter test test (#55873) 2020-04-28 10:45:36 -07:00
Jonah Williams
1ab3878996
[flutter_tools] support --enable-experiment in flutter test (#55564)
Support --enable-experiment in flutter test (for flutter_tester). Required minor change for null safety.
2020-04-27 14:47:43 -07:00
Jonah Williams
0b3f5cfcc0
[flutter_tools] initial support for enable experiment, run, apk, ios, macos (#54617) 2020-04-21 20:39:36 -07:00
Dan Field
6a490ed497
Revert "validate engine hash (#55057)" (#55220)
This reverts commit 98651c0252.
2020-04-20 10:56:39 -07:00
Dan Field
98651c0252
validate engine hash (#55057) 2020-04-17 16:30:26 -07:00
Jonah Williams
e092dcfa22
[flutter_tools] Reland: fix multiple dart defines (#54973) 2020-04-16 10:56:49 -07:00
Jonah Williams
11ab2fa35c
Revert "[flutter_tools] fix multiple defines in flutter tooling, web (#54909)" (#54967)
This reverts commit b8bd09db21.
2020-04-16 08:33:16 -07:00
Jonah Williams
b8bd09db21
[flutter_tools] fix multiple defines in flutter tooling, web (#54909) 2020-04-15 22:25:32 -07:00
Yegor
14cceefe2b
Make Web shard count configurable via WEB_SHARD_COUNT (#54678) 2020-04-13 16:05:02 -07:00
Emmanuel Garcia
54dba4cd59
Don't import plugins that don't support android in settings.gradle (#54407) 2020-04-12 08:55:03 -07:00
Christopher Fujino
19c8948e61
Fix frameworkVersionFor for flutter doctor and usage (#54217) 2020-04-08 12:47:05 -07:00
Anisov Aleksey
be6234d56e
Read custom app project name from gradle.properties (#52791) 2020-04-05 20:46:44 -07:00
adityapstar
a57feac62e
fixed typo in HttpClient failure message (#53211) 2020-03-25 15:26:01 -07:00
Yegor
2e36be7691
Enable more material and cupertino tests on the Web (#52961) 2020-03-20 11:36:24 -07:00
Yegor
5ea13b8493
fix KeySet.hashCode; enable multiple web tests (#52861)
fix KeySet.hashCode; enable multiple web tests
2020-03-20 08:49:19 -07:00
Yegor
7b4c195f99
Fix web test flakiness; enable web golden tests (#52789)
* Fix web test flakiness; enable web golden tests

The fix is three-part:

- Only allow one test to load _and_ test at any point in time.
- Use a fresh Chrome instance for each test file.
- Increase Cirrus resources.

The first two changes only fix the "Unknown error loading" error, but not hanging tests. The resource increase also prevents hanging tests.

Other minor changes:

- Remove test batching (it's no longer necessary)
- Fix the Chrome class, which was using the wrong Completer.
2020-03-18 15:11:48 -07:00
Jonah Williams
b7101b45f5
[flutter_tools] disable added integration test due to Cirrus flakes (#52782) 2020-03-17 19:07:22 -07:00
Jonah Williams
6884086e5c
[flutter_tools] Update to latest dwds APIs (#51004)
Update to latest dwds APIs, moving back to dwds driven hot restart and enabling future work on expression evaluation.
2020-03-17 17:29:53 -07:00
Michael Thomsen
e167181444
Move flutter_gallery to the testing folder (#52532)
Move Flutter Gallery to dev/integration_tests/ as it is an older copy used only for testing. The current version of the Flutter Gallery now lives in https://github.com/flutter/gallery.
2020-03-16 10:31:42 +01:00
Ben Konyi
66b978a197
Update pub dependencies to roll forward package:test (#52273) 2020-03-10 13:26:02 -07:00
Jonah Williams
9437639590
[flutter_tools] fix coverage measurement to report on lib and not test (#52093) 2020-03-06 10:24:23 -08:00
Jonah Williams
bbf913bc4c
[flutter_tools] resolve requests to web directory in debug mode (#51995) 2020-03-05 12:34:03 -08:00
Jonah Williams
124aa6f8b1
[flutter_tools] use package:test for coverage and remove build_runner test precompilation (#51966) 2020-03-04 17:12:58 -08:00
Jonah Williams
9b4159c5ee
[flutter_tools] support run -d chrome test scripts (#51658) 2020-02-28 14:21:02 -08:00
Alexandre Ardhuin
85ab331c82
fix unnecessary_string_interpolations lint (#50790) 2020-02-14 10:41:23 +01:00
Yegor
b34046903b
Fix stack trace parsing on non-debug builds; add e2e tests (#50652)
* Fix stack trace parsing on non-debug builds; add e2e tests
2020-02-13 18:34:08 -08:00
Dan Field
766bd70598
Image tracing (#50648) 2020-02-13 14:04:02 -08:00
Jenn Magder
13e30aaec6
Remove android directory from platform_channel_swift example project (#50213) 2020-02-06 11:39:55 -08:00
Dan Field
b2a27c109c
Be clearer about when and why we override HttpClient in tests (#49844) 2020-01-31 09:22:30 -08:00
Yegor
423459da18
Initial web benchmark harness and 3 benchmarks (#49460)
Initial web benchmark harness and 3 benchmarks
2020-01-30 14:19:17 -08:00
Greg Spencer
4b4cff94bf
Move stocks example app into dev/benchmarks/test_apps (#49559)
The stocks example app is outdated and deprecated, but we still use it for some benchmark tests. Moving it into the benchmarks directory to indicate its status.
2020-01-30 09:31:07 -08:00
Jonah Williams
dd98046fe5
Revert "[flutter_tools] remove alternative build aot code path (#49577)" (#49641)
This reverts commit d1e25bf233.
2020-01-28 13:21:56 -08:00
Jonah Williams
d1e25bf233
[flutter_tools] remove alternative build aot code path (#49577) 2020-01-28 13:08:04 -08:00
chunhtai
4964fb62e1 reland add lifecycle enum and remove workaround (#49368) 2020-01-27 10:38:02 -08:00
chunhtai
ec1044a877
Revert "reland add lifecycle enum and remove workaround (#48460)" (#49098)
This reverts commit d372814f78.
2020-01-17 19:19:33 -08:00
chunhtai
d372814f78 reland add lifecycle enum and remove workaround (#48460) 2020-01-15 16:33:01 -08:00
Alexandre Ardhuin
4f9b6cf017
enable lint prefer_final_in_for_each (#47724) 2020-01-07 16:32:04 +01:00
Angjie Li
9df1790f24 Flutter Web Driver Support (#47890) 2020-01-02 19:48:01 -08:00
Dan Field
24f39d40a4 Revert "Revert "Add many more global analyses. (#47875)" (#48080)" (#48081)
This reverts commit 04ea3183ce.
2020-01-02 11:47:28 -08:00
Francisco Magdaleno
04ea3183ce
Revert "Add many more global analyses. (#47875)" (#48080)
This reverts commit e768c92fbc.
2020-01-02 09:25:59 -08:00
Ian Hickson
e768c92fbc
Add many more global analyses. (#47875)
* Update packages.

* Add many more global analyses.

* Catch trailing spaces and trailing newlines in all text files.
  Before we were only checking newly added files, but that means we
  missed some.

* Port the trailing spaces logic to work on Windows too.

* Correct all the files with trailing spaces and newlines.

* Refactor some of the dev/bots logic into a utils.dart library.
  Notably, the "exit" and "print" shims for testing are now usable
  from test.dart, analyze.dart, and run_command.dart.

* Add an "exitWithError" function that prints the red lines and
  then exits. This is the preferred way to exit from test.dart,
  analyze.dart, and run_command.dart.

* More consistency in the output of analyze.dart.

* Refactor analyze.dart to use the _allFiles file enumerating logic
  more widely.

* Add some double-checking logic to the _allFiles logic to catch
  cases where changes to that logic end up catching fewer files
  than expected (helps prevent future false positives).

* Add a check to prevent new binary files from being added to
  the repository. Grandfather in the binaries that we've already
  added.

* Update all the dependencies (needed because we now import crypto in
  dev/bots/analyze.dart).
2019-12-30 17:12:19 -08:00
Francisco Magdaleno
f2f9d0e4fd
Revert "Flutter Web Driver Support (#47470)" (#47698)
This reverts commit cc1c9649c4.
2019-12-23 15:20:11 -08:00
Angjie Li
cc1c9649c4 Flutter Web Driver Support (#47470) 2019-12-19 19:53:01 -08:00
Lau Ching Jun
2df964581f
Revert "Flutter Web Driver Support (#45951)" (#47389)
This reverts commit 1ef0eadb45.
2019-12-18 17:02:31 -08:00
Angjie Li
1ef0eadb45 Flutter Web Driver Support (#45951)
* Support Flutter Driver test for Flutter Web application.

* Support Flutter Driver test for Flutter Web application.

* Fix documentation issues.

* Support Flutter Driver test for Flutter Web application.

* Fix documentation.

* Remove unused file from dartdoc check.

* Sync to date.

* Revert change to dartdoc.

* Address comments.

* Apply suggestions from code review

Co-Authored-By: Jonah Williams <jonahwilliams@google.com>

* Update copyrights.

* Update allowed list for browsers.

* Verify command line arguments for Drive command is correctly parsed.

* Make waitUntilFirstFrameRasterized throw unimplementedError for Flutter Web Driver.

* Add comment for why sync WebDriver is used.

* Update documentations.

* Add more unit tests and update documentation.

* Configure test.dart so that web_extension_test will be executed with --platform=chrome.

* Revert unnecessary changes.

* Add new file path for Windows to blacklist.

* Reconstruct the structure of flutter_driver/test/src folder to remove filtering logic in dev/bots/test.dart/

* Fix path to web_extension_test.dart.

* Add instructions for how to use WebFlutterDriver.

* Update getLayerTree to use sendCommand instead of _sendCommand.

* Update pubspec files.
2019-12-18 10:45:39 -08:00
Jonah Williams
dfcd6568e8
re-enable build runner tooling tests (#46708) 2019-12-10 13:10:09 -08:00
Jonah Williams
bda9d90804
[flutter_tool] Reland: support --fast-start for Android applications (as an opt-in) (#46140) 2019-12-10 10:26:14 -08:00
Jonah Williams
523ac7b6f5
[flutter_tool] Always re-copy Framework/podspec when regenerating iOS module project (#45877) 2019-12-09 21:18:09 -08:00
Lau Ching Jun
c2eb0681ce
Implement screenshot test for flutter web. (#45530) 2019-12-06 14:25:39 -08:00
Shi-Hao Hong
37e66b2179
gen_l10n.dart tool testing (#44856)
* Add tests to gen_l10n.dart tool

* Separate out LocalizationsGenerator class to improve testability of code

* Add testing dependencies to dev/tools

* Integrate dev/tools testing to flutter CI

* Restructure dev/tools folder for testing

* Fix license headers
2019-12-06 11:35:08 -08:00
Jonah Williams
7f235ea8bc
Mitigation for current tool test skips on CI (#46181) 2019-12-05 23:16:25 -08:00
Jenn Magder
d01de941b9
Revert "Support --fast-start for Android applications (as an opt-in) (#45431)" (#46138)
This reverts commit 2a113165c0.
2019-12-04 18:12:57 -08:00
Jonah Williams
2a113165c0
Support --fast-start for Android applications (as an opt-in) (#45431) 2019-12-04 17:34:25 -08:00
Dan Field
088fa24463
Set the LANG when invoking cocoapods (#45710) 2019-12-02 13:26:32 -08:00
Ian Hickson
449f4a6673
License update (#45373)
* Update project.pbxproj files to say Flutter rather than Chromium

Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.

* Update the copyright notice checker to require a standard notice on all files

* Update copyrights on Dart files. (This was a mechanical commit.)

* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.

Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).

* Clean up the copyrights in non-Dart files. (Manual edits.)

Also, make sure templates don't have copyrights.

* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -08:00
Emmanuel Garcia
943f98d3c3
Add integration test for transitive plugin dependencies (#45579) 2019-11-26 08:58:43 -08:00
Todd Volkert
bae92c32e5
Disable tests that fail on non-master branches from running on those branches (#45455)
https://github.com/flutter/flutter/issues/45453
2019-11-24 22:29:28 -08:00
Greg Spencer
a60bf8e23a
Spell check of Flutter docs (#45200)
No code changes, just comments: I spell-checked all the comments in the repo.
2019-11-22 08:43:55 -08:00
Danny Tuppeny
927fbe5500
Re-enable asserts on Windows integration tests (#42637)
* Enable asserts

See https://github.com/flutter/flutter/issues/36476

* Remove comment
2019-11-20 17:50:37 +00:00
Jonah Williams
f20471d081 Revert "reland add lifecycle enum and fix the scheduleforcedframe (#45133)" (#45260)
This reverts commit 99324105da.

It was implicated in https://github.com/flutter/flutter/issues/45258
2019-11-20 09:43:15 -08:00
chunhtai
99324105da
reland add lifecycle enum and fix the scheduleforcedframe (#45133)
* reland add lifecycle enum and fix the scheduleforcedframe
2019-11-19 15:45:37 -08:00
chunhtai
7e1920b817
revert added lifecycle enum (#45119) 2019-11-18 13:38:47 -08:00
chunhtai
af48f71497
reland add new enum change (#45012)
This reverts commit 75f310791f.
2019-11-18 10:04:09 -08:00
Kate Lovett
7aa5b07537
Adding flutter_goldens package tests (#44479) 2019-11-15 10:29:19 -08:00
Kaushik Iska
75f310791f Revert "reland add new enum change (#44281) (#44487)" (#44947)
This reverts commit f0794917fc.
2019-11-14 16:49:43 -08:00
chunhtai
f0794917fc
reland add new enum change (#44281) (#44487)
* reland add new enum change (#44281)

This reverts commit ed82bb821c.
2019-11-14 13:27:38 -08:00
Jonah Williams
eeb88f4385
Revert "Demonstrate that artifact invalidation works (#44312)" (#44463)
This reverts commit c1d029b84f.
2019-11-08 12:44:24 -08:00
Jonah Williams
c1d029b84f
Demonstrate that artifact invalidation works (#44312) 2019-11-08 12:32:55 -08:00
Emmanuel Garcia
2c80bc973d
Flip enable-android-embedding-v2 flag (#44369) 2019-11-07 15:18:56 -08:00
xster
d2e87a5d2c
Build ios framework (#44065) 2019-11-06 14:54:15 -08:00
chunhtai
ed82bb821c
revert add new enum change (#44281) 2019-11-06 11:07:24 -08:00
chunhtai
7aebde1904
added new lifecycle state (#39945)
* added new lfecycle state

* update

* update
2019-11-05 20:03:09 -08:00
Yegor
f6eb129597
fix text tests on the web (#44021) 2019-11-05 10:05:16 -08:00
Yegor
5f6ca6838e
Enable heroes_test.dart on the web matrix (#43662) 2019-10-29 12:23:16 -07:00
Yegor
f5f24a6cd1
Enable tests that failed due to CupertinoDynamicColor (#43636) 2019-10-28 13:38:18 -07:00
Yegor
02abd00e93
Cupertino web tests (#43529)
* enable more tests after material fixes
* enable some of the Cupertino tests
2019-10-25 15:03:25 -07:00
Yegor
903ebd714d
Fix and enable most of material tests for Web (#43019) 2019-10-24 21:35:14 -07:00
Ian Hickson
45e9f657c0
ENABLE_ANDROID_EMBEDDING_V2 isn't a general thing. (#43379) 2019-10-23 17:22:07 -07:00
Emmanuel Garcia
30493a35b6
Test Gradle on Windows (#42709) 2019-10-21 16:42:46 -07:00
Ian Hickson
124dc6617f
Clean up test infrastructure (#43030)
See #41880 for history.
2019-10-18 16:35:39 -07:00
Jonah Williams
1982a5c3ec
Revert "Clean up test infrastructure (#41880)" (#42982)
This reverts commit 1781d5c9bb.
2019-10-17 19:47:16 -07:00
Ian Hickson
1781d5c9bb
Clean up test infrastructure (#41880) 2019-10-17 19:22:47 -07:00
Emmanuel Garcia
08c645b3b2
Test the Android embedding v2 (#42708)
* Test the Android embedding v2

* Update integration tests

* Split into shards
2019-10-16 21:26:10 -07:00
Yegor
86f069f1c0
Add most of the widget tests; add more web test shards (#42807) 2019-10-16 09:18:44 -07:00
Yegor
21a18fbe16
enable rendering rests on the Web (#42773) 2019-10-15 15:25:47 -07:00
Yegor
3bc3b323c4
Reland: fix and add painting web tests (#42689) 2019-10-14 21:22:44 -07:00
Yegor
163be41d80
Revert "Fix and enable painting tests on the Web (#42546)" (#42687)
This reverts commit 13a1b1e3b9. It broke the build.
2019-10-14 15:14:16 -07:00
Yegor
13a1b1e3b9
Fix and enable painting tests on the Web (#42546)
fix and enable painting tests on the Web
2019-10-14 14:34:15 -07:00
Yegor
9cd9680b5e
Shard web tests; enable semantics tests on the Web (#42203)
Shard web tests; enable semantics tests on the Web
2019-10-10 07:04:38 -07:00
Emmanuel Garcia
1d2eaaf204
Ensure that flutter assets are copied in the AAR (#42306) 2019-10-09 16:29:20 -07:00
Yegor
ebfe6020b8
Enable more web tests; use blacklist to filter them out (#41922)
Add more web tests;use blacklist instead of whitelist
2019-10-07 15:05:24 -07:00
Jenn Magder
4331c172d7
Set DEFINES_MODULE=YES in plugin templates (#41828) 2019-10-03 18:35:20 -07:00
Yegor
33f4f8e6df
run services tests on the Web (#41806) 2019-10-02 15:11:22 -07:00
Ian Hickson
8c6d60bcfd
Move commands into their own shard (#39140) 2019-10-02 12:46:51 -07:00
Christopher Fujino
e70236e36c
Fix tools test verifyVersion() regex (#41744) 2019-10-02 09:32:30 -07:00
Jonah Williams
b2f38396f4
Reland: Switch to assemble API for dart2js (#41659)
* Stop using build_runner for dart2js

* fixes to yield when computing hashes and to imports

* add missing await

* Update filecache_test.dart

* Fix paths in filecache test

* use file uri for import

* add test cases and configurable override

* remove test dep

* fix filepaths for windows

* test no longer failing

* fix paths for test cases

* fix typo

* address comments

* make a constant

* make filehash async and use constant

* fix silly logic error
2019-10-01 14:03:42 -07:00
Yegor
8246785f3f
Spawn no more than 1 iframe in web tests. Using multiple iframes in DDK mode times out tests. Also set concurrency to 1 to guarantee that the test runner does not even attempt to parallelize tests. (#40630)
Spawn no more than 1 iframe in web tests. Using multiple iframes in DDK mode times out tests. Also set concurrency to 1 to guarantee that the test runner does not even attempt to parallelize tests.
2019-10-01 13:58:05 -07:00
Jonah Williams
06a6fdbf23
Revert "Switch to assemble API for dart2js (#41447)" (#41658) 2019-09-30 18:35:01 -07:00
Jonah Williams
ccc3dd968c
Switch to assemble API for dart2js (#41447) 2019-09-30 18:26:28 -07:00
Emmanuel Garcia
16d408a7a0
Reland #40810: Re-enable AAR plugins when an AndroidX failure occurred (#41160) 2019-09-24 16:16:22 -07:00
Emmanuel Garcia
2c8813c86c
Revert "Re-enable AAR plugins when an AndroidX failure occurred (#40810)" (#41042)
This reverts commit 96482eeb5c.
2019-09-23 09:28:38 -07:00
Emmanuel Garcia
96482eeb5c
Re-enable AAR plugins when an AndroidX failure occurred (#40810) 2019-09-20 08:28:52 -07:00
Alexandre Ardhuin
a36f809e27
add missing trailing commas (in dev/) (#40704) 2019-09-19 07:54:46 +02:00
Amir Hardon
4e108b6f90
Exclude non Android plugins from Gradle build (#40640)
Before this change, having an Android app depend on a plugin that has no android implementation resulted in a Gradle build failure.

This scenario is likely to become more common if we're enabling federated plugins, as the package implementing just the desktop implementation of a plugin won't have an Android implementation.

This changes the Gradle plugin to not try to build any plugins that doesn't have an android/build.gradle file.
2019-09-18 16:42:20 -07:00
Alexandre Ardhuin
df4bf453ab
more UI-as-code (#35516) 2019-09-17 16:23:44 +02:00
Emmanuel Garcia
0df1594ba2
Enable the resource shrinker (#40610) 2019-09-16 15:27:05 -07:00
Jonah Williams
91af071570
ensure dart2js does not compile unsupported packages (#40368) 2019-09-12 15:25:21 -07:00
Emmanuel Garcia
1676b012e8
Disable foundation tests (#40200) 2019-09-10 19:01:12 -07:00
Harry Terkelsen
d33cf11556
Automatically generated registrants for web plugins (#39628)
* WIP on web plugin registry

* WIP on registering plugins

* WIP on web plugin registration

* Only generate `package:flutter_web_plugins` imports if plugins are
defined

* Add parsing test

* Add documentation

* Fix analyzer warnings

* add license headers

* Add tests for package:flutter_web_plugins

* Run `flutter update-packages --force-upgrade`

* Fix analyzer errors

* Fix analyzer error in test

* Update copyright and remove flutter SDK constraints

* Enable tests since engine has rolled

* add flutter_web_plugins tests to bots

* Create an empty .packages file for WebFs test
2019-09-03 10:37:34 -07:00
Yegor
190698d0d2
run web tests in batches; enable foundation tests (#37268)
* shard tests

* make foundation tests pass
2019-08-23 13:23:48 -07:00
∂ω∂
4277f364ff flutter_tools/version: git log.showSignature=false (#38576) 2019-08-21 13:55:57 -07:00
Ian Hickson
e0a31de61b
Clean up bots output (#36864) 2019-08-20 14:53:39 -07:00
James D. Lin
b2f8d3a668
Instrument pending timers in tests (#37646)
Flutter widget tests assert if a test completes with timers still
pending.  However, it can be hard to diagnose where a pending timer
came from.  For example, a widget might consume a third-party library
that internally uses a timer.

I added a FakeAsync.pendingTimersDebugInfo getter to quiver
(https://github.com/google/quiver-dart/pull/500).  Make flutter_test
use it.

Additionally modify Flutter's debugPrintStack to take an optional
StackTrace argument instead of always printing StackTrace.current.

Fixes #4237.
2019-08-20 10:28:49 -07:00
James Lin
4f3b70671c Add assert messages 2019-08-15 16:47:20 -07:00
James Lin
e3ffa7689a Update with review feedback from dnfield and jonahwilliams 2019-08-15 16:47:20 -07:00
James Lin
c02b805cdc Give _runFlutterTest the ability to validate command output
In another change (#37646), I want to test that a test fails and
prints expected output.  I didn't see an existing way to do that, so
I modified `_runFlutterTest` and `runCommand` to allow capturing the
output.  Currently capturing and printing output are mutually
exclusive since we don't need both.

Some awkward bits:
* There already exists a `runAndGetStdout` function that is very
  similar to `runCommand`, and this change makes the conceptual
  distinction more confusing.

* `runFlutterTest` has multiple code paths for different
  configurations.  I don't understand what the different paths are
  for, and I added output checking only along one of them.
2019-08-15 16:47:20 -07:00
Yegor
9bc298deb6
update dependencies; add a Web smoke test (#37816)
update dependencies; add a Web smoke test
2019-08-09 09:58:49 -07:00
Jenn Magder
af1bbc4374
Disable flaky test (#37442) 2019-08-01 17:22:17 -07:00
Emmanuel Garcia
9f39cad4ed
Allow flavors and custom build types in host app (#36805)
Fixes these issues:
#30916
#34089
#36479
#29648
2019-07-29 09:26:41 -07:00
Michael Klimushyn
30eec11e7d Roll back the AAR build experiment (#36966)
* Roll back the AAR build experiment

This has been breaking flutter/plugins CI for the past day.

* Remove integration tests that rely on the AAR flag
2019-07-25 20:54:10 -07:00
Emmanuel Garcia
c469b1fea9
Add annotation dependency to plugins (#36886)
Fixes #36817
2019-07-25 08:49:24 -07:00
Emmanuel Garcia
242a4225a1
Flutter build aar (#36732)
`flutter build aar`

This new build command works just like `flutter build apk` or `flutter build appbundle`, but for plugin and module projects.

This PR also refactors how plugins are included in app or module projects. By building the plugins as AARs, the Android Gradle plugin is able to use Jetifier to translate support libraries into AndroidX libraries for all the plugin's native code. Thus, reducing the error rate when using AndroidX in apps.

This change also allows to build modules as AARs, so developers can take these artifacts and distribute them along with the native host app without the need of the Flutter tool. This is a requirement for add to app.

`flutter build aar` generates POM artifacts (XML files) which contain metadata about the native dependencies used by the plugin. This allows Gradle to resolve dependencies at the app level. The result of this new build command is a single build/outputs/repo, the local repository that contains all the generated AARs and POM files.

In a Flutter app project, this local repo is used by the Flutter Gradle plugin to resolve the plugin dependencies. In add to app case, the developer needs to configure the local repo and the dependency manually in `build.gradle`:


repositories {
    maven {
        url "<path-to-flutter-module>build/host/outputs/repo"
    }
}

dependencies {
    implementation("<package-name>:flutter_<build-mode>:1.0@aar") {
       transitive = true
    }
}
2019-07-23 09:27:42 -07:00
Emmanuel Garcia
c9b466f9e2
Revert "Add flutter build aar (#35217)" (#36731)
This reverts commit 11460b8378.
2019-07-22 22:07:59 -07:00
Emmanuel Garcia
11460b8378
Add flutter build aar (#35217)
`flutter build aar`

This new build command works just like `flutter build apk` or `flutter build appbundle`, but for plugin and module projects.

This PR also refactors how plugins are included in app or module projects. By building the plugins as AARs, the Android Gradle plugin is able to use Jetifier to translate support libraries into AndroidX libraries for all the plugin's native code. Thus, reducing the error rate when using AndroidX in apps.

This change also allows to build modules as AARs, so developers can take these artifacts and distribute them along with the native host app without the need of the Flutter tool. This is a requirement for add to app.

`flutter build aar` generates POM artifacts (XML files) which contain metadata about the native dependencies used by the plugin. This allows Gradle to resolve dependencies at the app level. The result of this new build command is a single build/outputs/repo, the local repository that contains all the generated AARs and POM files.

In a Flutter app project, this local repo is used by the Flutter Gradle plugin to resolve the plugin dependencies. In add to app case, the developer needs to configure the local repo and the dependency manually in `build.gradle`:


repositories {
    maven {
        url "<path-to-flutter-module>build/host/outputs/repo"
    }
}

dependencies {
    implementation("<package-name>:flutter_<build-mode>:1.0@aar") {
       transitive = true
    }
}
2019-07-22 20:46:01 -07:00
Jonah Williams
3fedb8cb5a
Reland: use flutter features for web and desktop (#36699) 2019-07-22 15:34:03 -07:00
Jonah Williams
8eae2dfb92
Revert "Use FlutterFeatures to configure web and desktop devices (#36465)" (#36654)
This reverts commit bd52a78c71.
2019-07-21 21:47:43 -07:00
Jonah Williams
bd52a78c71
Use FlutterFeatures to configure web and desktop devices (#36465) 2019-07-21 18:21:15 -07:00
Kate Lovett
09002457f9
Fix test_widgets-windows not running tests (#36468) 2019-07-19 10:43:58 -07:00
Dan Field
289064721d
Fix windows, exclude widgets from others (#36197) 2019-07-15 12:34:53 -07:00
Ian Hickson
d919e694b8
Move tools tests into a general.shard directory in preparation to changing how we shard tools tests (#36108) 2019-07-13 11:51:44 -07:00
Jonah Williams
fb9ff9296e
fix linesplitter (#36006) 2019-07-11 16:52:14 -07:00
gaaclarke
3122786ad5
Fixed build of example code to use new binary messenger API. (#35825)
Fixed build of example code to use new binary messenger API.
2019-07-10 13:10:05 -07:00
Jonah Williams
2b20345bb8
use pub run for create test and remove [INFO] logs (#35839) 2019-07-10 08:48:01 -07:00
Jenn Magder
2ad5376a06
Build all example projects in CI build smoke test (#35778) 2019-07-09 16:00:33 -07:00
Alexandre Ardhuin
758009ba70
more ui-as-code (#35393)
* more ui-as-code

* address review comments
2019-07-02 21:11:56 +02:00
Alexandre Ardhuin
919dcf53f3
enable lints prefer_spread_collections and prefer_inlined_adds (#35189) 2019-06-27 21:23:16 +02:00
Jonah Williams
33ad5bac34
Attempt to enable tool coverage redux (#35074) 2019-06-26 16:02:49 -07:00
Dan Field
bb79ff3b49
More shards (#34877)
Shard tool_tests
2019-06-26 13:55:16 -07:00
Dan Field
3630525673
Shard gradle tests (#34857) 2019-06-21 12:05:06 -07:00
Dan Field
a0fc3f3150
Shard framework tests (#34812) 2019-06-20 14:35:33 -07:00
Jonah Williams
449d4b1ee5
disable widgets and material (#34739) 2019-06-19 15:51:31 -07:00
Jonah Williams
c1a2e44c78
Allow flaky tests to pass or fail and mark web tests as flaky (#34456) 2019-06-13 17:52:04 -07:00
Jonah Williams
3ae6abd9e8
Compatibility pass on flutter/material tests for JavaScript compilation. (9) (#33378) 2019-06-12 17:06:01 -07:00
Emmanuel Garcia
21a532698f
Split gradle_plugin_test.dart (#34282)
Fixes timeout when running gradle_plugin_test
2019-06-11 16:24:03 -07:00
Jonah Williams
9d724d4c44
Compatibility pass on flutter/widgets tests for JavaScript compilation. (8) (#33377) 2019-06-11 14:51:03 -07:00
Jonah Williams
7cc716187b
Compatibility pass on flutter/semantics tests for JavaScript compilation. (7) (#33360) 2019-06-11 11:22:37 -07:00
Jonah Williams
05e92c828b
Compatibility pass on flutter/physics tests for JavaScript compilation. (6) (#33359) 2019-06-11 09:09:13 -07:00
Jonah Williams
ca14af6b92
Compatibility pass on flutter/rendering tests for JavaScript compilation. (5) (#33355) 2019-06-10 17:29:46 -07:00
Jonah Williams
c88f64ed50
Compatibility pass on flutter/services tests for JavaScript compilation. (4) (#33354) 2019-06-10 15:46:36 -07:00
Jonah Williams
c05fa894e6
Compatibility pass on flutter/painting tests for JavaScript compilation. (3) (#33352) 2019-06-10 14:05:51 -07:00
Jonah Williams
980a574d4c
Compatibility pass on flutter/scheduler tests for JavaScript compilation. (2) (#33350) 2019-06-10 10:17:53 -07:00
Jonah Williams
7f7c00a4e9
Enable web foundation tests (#34032) 2019-06-09 11:03:46 -07:00
Jonah Williams
698d458dc8
Add chrome stable to dockerfile and web shard (#33787) 2019-06-06 21:10:24 -07:00
Jonah Williams
3f4ce34877
make sure version check includes hotfixes (#33459) 2019-06-06 15:28:20 -07:00
Ian Hickson
2767d37c96 RTL caret in text fields (#33461) 2019-06-03 10:25:54 -07:00
Jonah Williams
0a2175f133
Pass FLUTTER_TOOL_ARGS to snapshot command. (#29938) 2019-03-27 15:24:08 -07:00
Jonah Williams
44b22c7b04
Fix cache location, artifacts, and re-enable dart2js test (#29783) 2019-03-25 18:47:37 -07:00
Jonah Williams
55a2ee588d
make build runner configurable (#29568) 2019-03-18 15:50:11 -07:00
Jonah Williams
72605d2406
Switch flutter_tools from script to app-jit snapshot. (#27749) 2019-03-15 19:33:24 -07:00
Jonah Williams
7bed378e22
Only run codegen at start of flutter_test (#29171) 2019-03-14 17:12:40 -07:00
Dan Field
97a8120969
guard new formatter behind env var (#29340)
* guard new formatter behind env var
2019-03-14 08:26:59 -07:00
Dan Field
b9f013c044
Make sure test reporter prints out stderr, and disables Bigquery for non-contributors (#29073)
* print stderr to stderr, no bq if not contributor

* let test continue of bigquery fails
2019-03-10 11:26:17 -07:00
Dan Field
2a644f301e
Run non-perf sensitive tests on Cirrus (#27971)
* Run non-perf sensisitive tests on Cirrus
2019-03-10 07:52:44 -07:00
Dan Field
3af88c5550
add heartbeat (#29056) 2019-03-08 16:12:27 -08:00
Jonah Williams
77142b8257
Revert "re-enable dart2js test (#29010)" (#29030)
This reverts commit 6a7f231d89.
2019-03-07 22:18:15 -08:00
Jonah Williams
6a7f231d89
re-enable dart2js test (#29010) 2019-03-07 21:56:02 -08:00
Dan Field
a3b484d0da
make coverage work again (#29016) 2019-03-07 18:59:43 -08:00
Dan Field
f67a529e6d
Fix coverage shard and print summary after test run (#28970)
* Fix coverage shard

* clarify

* Make sure we print test results

* Actually report test results before exiting

* revert unintended changes
2019-03-07 11:31:35 -08:00
Dan Field
e5b1ed7a7f
Fix for post submit on cirrus (#28963)
* Fix for post submit on cirrus
2019-03-06 14:23:37 -08:00
Dan Field
20e0f13cc9
Test reporter (#28297)
* Wrap test.main with a custom processor
* Report test results to bigquery table
2019-03-06 13:13:45 -08:00
Jonah Williams
d91cfffa50
switch tool tests to build runner (#28759) 2019-03-01 19:18:38 -08:00
Alexandre Ardhuin
387f885481
Add missing trailing commas (#28673)
* add trailing commas on list/map/parameters

* add trailing commas on Invocation with nb of arg>1

* add commas for widget containing widgets

* add trailing commas if instantiation contains trailing comma

* revert bad change
2019-03-01 08:17:55 +01:00
Jonah Williams
6350d0b48f
disable dart2js test (#28555) 2019-02-27 12:37:39 -08:00
Dan Field
b484a9129c
add2app test (#27712)
* add2app test
2019-02-23 09:56:27 -08:00
Jonah Williams
9bc5656637
Wire dart2js through flutter tool, add compilation test (#27668) 2019-02-14 22:42:30 -08:00
Danny Tuppeny
c19142d8b7
Support ANDROID_SDK_ROOT in addition to ANDROID_HOME (#25221)
* Fall back to ANDROID_SDK_ROOT if ANDROID_HOME is not set

And update descriptions to use the non-deprecated ANDROID_SDK_ROOT.

Fixes #15114.

* Remove trailing whitespace

* Update dev/devicelab/lib/framework/adb.dart

Co-Authored-By: DanTup <danny@tuppeny.com>

* Reformat long line
2018-12-17 17:29:09 +00:00
Dan Field
72926bdff7
Smoke test building IPA and APK on supported platforms (#24601)
* build tests - AOT on all, APK on Linux, IPA on Mac
2018-11-29 09:32:11 -08:00
Todd Volkert
b4ae4b00ae
Go back to -j1 in flutter_tools tests (#24196)
To see if it stops the Cirrus crashing
2018-11-09 17:31:17 -08:00
Jacob Richman
b21fb8c27d
Run flutter tests with --track-widget-creation as part of the build. (#23415) 2018-10-23 14:10:53 -07:00
Greg Spencer
65d3ddd5d1
Dartdoc snippet extension to inject full featured code snippets in to API docs. (#23281)
This creates a custom dartdoc tool that will generate snippet blocks in our API docs that allow the user to copy easily to the clipboard, and will also embed the snippet code into a template to show it in a larger context with an app.

This PR adds the snippet tool, a template, and a couple of HTML skeleton files, one for snippets that are designed to be in an application setting, and one where it simply puts a nice container around existing snippets, making them easier to copy to the clipboard.
2018-10-23 13:50:24 -07:00
Siva
cf18d01e86
Disable unsafePackageSerialization as it causes issues when coverage is turned on (#23280)
* Disable unsafePackageSerialization as it causes issues when coverage is
used (see https://github.com/dart-lang/sdk/issues/34841)

* Restore Coverage.
2018-10-19 06:19:24 -07:00
Danny Tuppeny
b357b55904
Use (processors-1) for test runs (test defaults to processors/2) (#22803)
* Use (processors-1) for test runs (test defaults to processors/2)

* Add missing import 🙄
2018-10-19 08:07:54 +01:00
Yegor
9524b611c0
skip coverage due to https://github.com/dart-lang/sdk/issues/34841 (#23224) 2018-10-17 17:56:07 -07:00
Jacob Richman
c6a222fa28
Revert "Run flutter tests with --track-widget-creation as part of the build. (#22596)" (#23129)
This reverts commit bf92d7f286.
2018-10-15 17:13:44 -07:00
Jacob Richman
bf92d7f286
Run flutter tests with --track-widget-creation as part of the build. (#22596) 2018-10-15 13:46:25 -07:00
Yegor
8d643013b1
add AOT smoke tests to Cirrus (#22751) 2018-10-08 12:38:46 -07:00
Alexandre Ardhuin
d340e2f229
apply lint prefer_void_to_null in dev/ (#22661) 2018-10-04 18:44:23 +02:00
Danny Tuppeny
d43155695d
Revert "Use (processors-1) for test runs (test defaults to processors/2)" (#22628)
* Revert "Custom offset functionality for Popup Menu Button (#22534)"

This reverts commit f44b277fa6.

* Revert "Updated the ColorScheme dartdoc: a11y (#22618)"

This reverts commit aa6a27e8a2.

* Revert "Added support for the Khmer (km) language (#22617)"

This reverts commit 3a87b93fce.

* Revert "Use 'Future<void>' insted of 'Future<Null>' in SystemChrome (#22583)"

This reverts commit 37c10acb97.

* Revert "Choice Chip Fix (#22589)"

This reverts commit 8d76d37f33.

* Revert "Throw if trying to set fs.currentDirectory in tests (#22037)"

This reverts commit 2f6155bf18.

* Revert "Use (processors-1) for test runs (test defaults to processors/2) (#22085)"

This reverts commit d44f003079.
2018-10-03 21:35:36 +01:00
Danny Tuppeny
d44f003079
Use (processors-1) for test runs (test defaults to processors/2) (#22085)
* Use (processors-1) for test runs (test defaults to processors/2)

* Add missing import 🙄
2018-10-03 19:06:48 +01:00
Danny Tuppeny
7dd82813f2
Remove -j1 to run tools tests concurrently (#22038)
Fixes #21113.
2018-09-19 17:47:06 +01:00
Alexandre Ardhuin
a07d3719a1
enable lint prefer_generic_function_type_aliases (#21680) 2018-09-14 21:06:19 +02:00
Alexandre Ardhuin
d927c93310
Unnecessary new (#20138)
* enable lint unnecessary_new

* fix tests

* fix tests

* fix tests
2018-09-12 08:29:29 +02:00
Alexander Aprelev
391e91c996
Split analysis steps out of dev/bots/test.dart into dev/bots/analyze.dart (#21174)
* Split analysis steps out of dev/bots/test.dart into dev/bots/analyze.dart.

This allows to run analysis step with command line arguments that are only applicable to flutter analyze(like --dart-sdk, needed for dart-flutter-engine head-head-head bot).

* Add forgotten dev/bots/analyze.dart

* Refactor common code from analyze.dart and test.dart into run_command.dart

* Remove comments, add header
2018-08-30 07:30:25 -07:00
Ian Hickson
53b635817c
Re-enable missing_return (#20844) 2018-08-28 11:22:57 -07:00
Danny Tuppeny
5eebfeb345
Let bot/devicelab tests run concurrently (#21116) 2018-08-28 18:15:00 +01:00
Greg Spencer
977da4fb20
Ignore pub-cache when analyzing (#20925)
This adds ".pub-cache" to the list of directories to ignore when checking for dependence upon dart:test, since when people install a downloadable package, their pub cache is in the flutter directory.

Also, I centralized the ANSI "red line" so that they would all use the same final string.
2018-08-24 14:06:25 -07:00
Danny Tuppeny
dc5a5c18a9
Start logger in startProgress to avoid assertion failure (#20814)
* Start logger in startProgress to avoid assertion failure

There are lots of places that create a Status() and all but two of them call ..start() immediately. This is one of the places that doesn't, which causes an assertion failure when running with --enable-asserts and the other is in the same file (I suspect it's also incorrect, but possibly it's never used - I'll look at that separately when I can trace some code that calls it).

Fixes #20812.

* Enable asserts for tools tests

* Fix lint

* Rename enableAsserts -> enableFlutterToolAsserts

To make it clearer that it only enables asserts for flutter_tools when set.
2018-08-23 20:49:59 +01:00
Jonah Williams
99b382953b
Create flutter_driver infra for testing the Android AccessibilityNodeInfo generated by Flutter (#19700) 2018-08-22 22:56:54 -07:00
Ian Hickson
ad1eaff45a
flutter analyze cleanup (#20490)
* `flutter analyze` cleanup

* Make `--dartdocs` work in all modes.
* Make `analyze-sample-code.dart` more resilient.
* Add a test for `analyze-sample-code.dart`.
* Minor cleanup in related code and files.

* Apply review comments

* Fix tests
2018-08-20 12:51:07 -07:00
Ian Hickson
8c79f40d71
Fixes resulting from audit of issues links (#20772)
* Fixes resulting from audit of issues links

I looked at every link to GitHub in our repo. For cases where we had a TODO that was waiting for a bug to be fixed, and the bug has now been fixed, I applied the pending change. For cases where the link was out of date, I updated the link.

* Update run_test.dart

skip this test again since it failed on linux and macos bots
2018-08-18 16:44:39 -07:00
Ian Hickson
3dec6a6930
Clean up usage of temporary directories (#20682)
All temporary directory start with `flutter_` and have their random component separated from the name by a period, as in `flutter_test_bundle.YFYQMY`.

I've tried to find some of the places where we didn't cleanly delete temporary directories, too. This greatly reduces, though it does not entirely eliminate, the directories we leave behind when running tests, especially `flutter_tools` tests.

While I was at it I standardized on `tempDir` as the variable name for temporary directories, since it was the most common, removing occurrences of `temp` and `tmp`, among others.

Also I factored out some common code that used to catch exceptions that happen on Windows, and made more places use that pattern.
2018-08-17 13:17:23 -07:00
Ian Hickson
686d8f8a22 Shim package:test to avoid matcher issues (#20602)
* Upgrade everything except matcher.
* Roll matcher (and test)
* Adjust tests that depend on flutter:test directly to depend on a shim
* Require use of package:test shim and remove other references to package:test
2018-08-14 20:33:58 -07:00
Greg Spencer
01d6444490
Switch from infinite retries on upgrade to 10 retries. (#20450)
This changes the flutter tool to just try 10 times before giving up when running "flutter upgrade". Infinite retries can hang bots, and really don't provide a lot of help: if we've failed to upgrade for for nearly a minute, trying every five seconds, then something is just not responding.

Also, changed the bot default warning level to "normal" from "all", because the solver messages are VERY verbose: several megs of output for doing packages get on Flutter. "normal" will give warnings, user messages and errors, which should be sufficient to diagnose problems on the bots without spamming the log.

I removed the retrying for building the snapshot on flutter.bat because we don't do that on the other platforms, and because I can't imagine how running it again would give a different answer.

I also fixed a problem in the whitespace detection when no files matched the type of file that it is looking for, and removed the code that waits until failure to print the logs on setup, since reducing the log output made a huge difference.
2018-08-11 19:10:14 -07:00
Greg Spencer
e60087a1a7
Remove Travis configuration from flutter/flutter (#20288)
This removes the final traces of Travis and Appveyor from the Flutter tree.

I've updated the documentation and fixed a couple of places where scripts look for Travis, and eliminated the dart tools runningOnTravis function (which was unused anyhow).

There are places in the flutter script that used to look for the environment variable TRAVIS. We actually do want to continue to detect that we're running on Travis there, since in the plugins repo we still use Travis (for the moment). In any case, it's OK, because the CI environment variable is set on all of the CI bots (Cirrus, Travis, and Appveyor).

FastLane doesn't have a setup_cirrus equivalent to setup_travis, but it actually doesn't matter there either, since it doesn't do Travis-specific things, and it also looks for the CI environment variable.
2018-08-07 13:41:33 -07:00
Devon Carew
53bd0e20da
move where the mega_gallery benchmark code is generated by default (#20157)
* move where the mega_gallery benchmark code is generated by default

* generate into a temporary diectory
2018-08-06 09:26:32 -07:00
Alexandre Ardhuin
eda03e2586
re-re-enable lint unnecessary_const (#20103) 2018-08-02 12:02:32 +02:00
Greg Spencer
2a66fd34a3
Fix the whitespace check. (#20059)
I switched to just checking for spaces and tabs, since otherwise it expresses a preference for line endings that I think should be taken care of at the git level (and I think they are).

I also fixed a bug where I was looking for ".yml" instead of "*.yml" files, and clarified an output message.
2018-07-31 20:54:37 -07:00
Todd Volkert
00aac68e2d
Revert flutter/flutter#19592 (#19861)
It was causing problems rolling Flutter into Fuchsia
2018-07-27 08:44:39 -07:00
Greg Spencer
1a414990ab
Move commit range determination inside of test.dart (#19777)
Our Cirrus Windows tests were not really working: they reported success even when failing.

This should fix several problems with the Cirrus Windows tests.
2018-07-25 15:19:57 -07:00
Greg Spencer
f44f625c06
Fix whitespace detector to handle deleted files. (#19690)
The trailing whitespace detector wasn't handling file deletes very well (at all, really).

This filters the set of files grepped to only include files that exist.

Also, clarified the failure message to make it more obvious what the failure is when the grep finds results.
2018-07-23 15:41:31 -07:00
Alexandre Ardhuin
27018359d2
re-enable lint unnecessary_const (#19592)
* re-enable lint unnecessary_const

* remove trailling whitespaces

* remove unnecessary const (after merge)
2018-07-23 08:31:48 +02:00
Greg Spencer
90a5f4613f
Separate tools tests from other tests and put them in a different shard. (#19593) 2018-07-20 10:21:34 -07:00
Greg Spencer
9f39039f7b
Add presubmit test for trailing whitespace. (#19412)
Checks only changed source files (C++, Dart, Java, ObjC) for trailing whitespace.
2018-07-19 23:05:37 -07:00
Ian Hickson
f630f90d6d
Revert "enable lint unnecessary_const (#19342)" (#19423)
This reverts commit cc1cf13eec.
2018-07-16 13:30:27 -07:00
Alexandre Ardhuin
cc1cf13eec
enable lint unnecessary_const (#19342) 2018-07-16 21:43:48 +02:00
Ian Hickson
3351423a42
Do less wory on AppVeyor since we're running out of time. (#18814) 2018-06-25 19:28:42 -07:00
Chris Bracken
2ae48845a8
Revert elimination of Dart 1 (#18460)
fuchsia_tester.dart still assumes Dart 1. Previously, it ran tests directly
from source, flutter_platform.dart automatically runs a kernel compile when
operating in Dart 2 mode, but this assumes a functional Dart SDK is available
in the artifacts directly, and fuchsia_tester.dart mocks out the artifacts
directory with an empty temp dir.

Remaining work is:
1. Get the frontend server building as a dependency on Fuchsia.
2. Patch fuchsia_tester.dart to use a valid Dart SDK and frontend server.

This also reverts migration to Dart 2 typedef syntax.

This reverts commit 6c56bb2. (#18362)
This reverts commit 3daebd0. (#18316)
2018-06-13 12:46:39 -07:00
Ian Hickson
dac2ebf0c0
More flexible timeout logic in flutter_test (#18256)
This should reduce the number of flakes without actually increasing
the timeout, so we'll still find out quickly if a test is hanging.

The numbers here might need tweaking. Maybe the default two seconds is
too short for CI bots.
2018-06-11 16:28:01 -07:00
Greg Spencer
6c56bb2420
Update typedef syntax to use Function notation and turn on lint for old notation. (#18362)
Now that Dart 1 is turned off, reapplying my change to turn on the prefer_generic_function_type_aliases analysis option, and fix all the typedefs to Dart 2 preferred syntax.

Also eliminated the unused analysis_options_repo.yaml file and turned on public_member_api_docs in analysys_options.yaml.

No logic changes, just changing the typedef syntax for all typedefs, and updating analysis options.
2018-06-11 15:51:45 -07:00
Chris Bracken
3daebd059c
It's time to #deleteDart1 (again) (#18316)
* It's time to #deleteDart1 (#18293)

Eliminates support for Dart 1 in flutter_tools, and drops our Dart 1
benchmarks. All commands now run in Dart 1 mode only.

Eliminates --preview-dart-2 / --no-preview-dart-2 support.

* Fix indentation, remove no longer necessary .toList()

* Only push udpated kernel if >0 invalidated srcs
2018-06-08 15:49:24 -07:00
Chris Bracken
9495df4bc3
Revert "It's time to #deleteDart1 (#18293)" (#18313)
Several benchmarks started failing during kernel compile:
1. Timeouts:
   * commands_test
   * hot_mode_dev_cycle__benchmark
   * run_machine_concurrent_hot_reload
   * service_extensions_test

2. Kernel compiler crash:
   * hot_mode_dev_cycle_linux__benchmark
   * routing_test

3. Unexpected termination:
   * hot_mode_dev_cycle_win__benchmark

This reverts commit ed63e7082a.
2018-06-08 12:43:11 -07:00
Chris Bracken
ed63e7082a
It's time to #deleteDart1 (#18293)
Eliminates support for Dart 1 in flutter_tools, and drops our Dart 1
benchmarks. All commands now run in Dart 1 mode only.

Eliminates --preview-dart-2 / --no-preview-dart-2 support.
2018-06-08 11:04:57 -07:00
Alexandre Ardhuin
09276bea25
enable lint prefer_equal_for_default_values (#18156) 2018-06-05 08:50:40 +02:00
Ian Hickson
e3427550e9
Be less verbose in the logs. (#17401)
Now that we have thousands of tests, it doesn't make sense to display a separate line for each test. The result is just megabytes of logs that you have to scrub through to find error messages.
2018-06-04 15:22:19 -07:00
Greg Spencer
b921fdc58e
Revert "Update typedef syntax to use Function notation and turn on lint for old notation. (#18035)" (#18041)
This reverts commit 3258602073.
2018-05-30 13:51:14 -07:00
Greg Spencer
3258602073
Update typedef syntax to use Function notation and turn on lint for old notation. (#18035)
Fixes #18028

Just changes typedef declarations, no logic changes.
2018-05-30 12:13:58 -07:00
Todd Volkert
1808ac338c
Add support for custom test error reporters (#17727)
This allows test environments other than `flutter test` to have a hook
into the test exception reporting. Some test environments, for example,
don't just dump error details to the console, but rather require them
to be reported to a separate server.
2018-05-18 13:58:08 -07:00
Vyacheslav Egorov
e8d0874468
Fix running dev/bots/test.dart in Dart 2 mode (#17256) 2018-05-07 18:22:36 +02:00
Fedor Korotkov
7333459916 Configure Cirrus CI (#16224)
* Configure Cirrus CI

* Read file directly instead of shelling a command

* Wait for all streams to finish

* Add LTR `textDirection`

Since `RenderFlex#_debugHasNecessaryDirections` requires it when `direction` is horizontal and there are multiple children.
2018-05-01 15:11:21 -07:00
Alexander Aprelev
6bd6897014
Run tests in dart2 mode. (#16675)
* Run tests in dart2 mode.

* Fix type check

* Drop --checked, leave --preview-dart-2

* Remove debugging leftovers.
2018-04-18 11:24:54 -07:00
Todd Volkert
58d3493445
Add a timeout to bot tests. (#16666)
This will catch the case where tests hang -- and it will
force them to fail so that we see the output from the test.
2018-04-17 10:00:06 -07:00
Martin Kustermann
2fa8baada6
Run test coverage in dart2 again (#15932) 2018-04-05 10:25:04 +02:00
Alexander Aprelev
d6be4f5553
Fix powershell cat invocation to ensure correct encoding and line ending. (#16193)
* Fix powershell cat invocation to ensure correct encoding and line ending.

* Restore original flow for non-Windows platforms

* Reformat code to get rid of multi-line ?: expression

* Double quotes to single quotes
2018-04-03 12:47:54 -07:00
Andrew Davies
72fd020a24
[fuchsia_remote_debug_protocol] Adds the fuchsia remote debug protocol package.
Adds a package that will support connecting to and debugging devices with multiple instances of the Dart VM, and operate on multiple Isolates and Flutter Views.

Currently supports connecting to all existing Dart VMs and extracting information about all Flutter Views running across each VM.
2018-03-22 17:19:02 -07:00
Jonah Williams
ad9506d25a
Traverse dependencies and dev dependencies separately (#15581)
* traverse dependencies and dev dependencies separately

* separate dev and reg deps

* update pubspecs

* add checksum string and update transitive dep string.  Add additional verify command to check checksum

* cleanup comments

* add missing space, quote, run verify-onlu from bot script

* rerun tool with fixed string

* ensure correct working directory and bump versions

* flutter not flutterRoot
2018-03-20 20:03:32 -07:00
Alexander Aprelev
cbbf4d4b1b
Run test coverage in dart1 mode. (#15635)
Running test coverage in dart2 mode runs over allocated timeslot on bots.
2018-03-16 17:44:47 -07:00
Vyacheslav Egorov
71b2cfb2a0
Turn Dart 2 mode by default. (#15565) 2018-03-16 20:29:38 +01:00
Alexander Aprelev
2f8474f9aa
Roll engine to b6df7a637498ca9beda1fa9cd7210e3202ea599f. (#15444)
* Roll engine to b6df7a637498ca9beda1fa9cd7210e3202ea599f.

Changes since last roll:
```
b6df7a637 Roll dart to 290c576264faa096a0b3206c71b2435309d9f904. (#4771)
a6764dbd5 Add sources for Fuchsia target. (#4763)
2d5900615 [fuchsia] Remove unused header file. (#4769)
9717063b7 Revert "Roll dart to c080951d45e79cd25df98036c4be835b284a269c. (#4767)" (#4768)
9a9814312 Roll dart to c080951d45e79cd25df98036c4be835b284a269c. (#4767)
e74e8b35c [async] Update includes of async headers to new path (#4760)
e2c4b2760 Use Dart 2 camel case constants in the engine Dart libraries (#4766)
9c1e48434 Updates for Fuchsia roll. (#4765)
14c940e27 Switch from fxl::Mutex to std::mutex (#4764)
debf82c0b Roll Garnet (#4759)
5bffdefbb Use weak pointers to the accesibility bridge from objects vended to the UIKit accessibility framework. (#4761)
```
2018-03-12 15:44:25 -07:00
Alexander Aprelev
70f60b17d7
Run dev/bots/test's flutter drive test in preview-dart-2 (#15090)
* Run dev/bots/test's flutter drive test in preview-dart-2

* Fix extension callback type

* More type fixes
2018-03-05 08:55:10 -08:00
Alexander Aprelev
d3797628ca
Run flutter tests in preview-dart-2 mode on travis flutter builds. (#14728)
* Run flutter tests in preview-dart-2 mode on travis flutter builds.

* Run dart2 tests on osx. Run dart tests in dart2.

* Fix name camelCase

* Default options to empty array, rather than null

* Troubleshoot failures

* More logging

* Troubleshoot: run single test

* Troubleshoot: run 15 tests

* Troubleshoot: run 15 tests with fix

* Try limit concurrency to 1

* Limit concurrency for preview-dart-2 tests to 4

* Move dart2 tests to allow_failures section

* Reinstate tests_dart_2 shard

* Raise concurrency to 8

* Reuse compiler across multiple test runs

* Allow to switch entry points when recompiling.

Actually use single compiler to incrementally recompile all tests executed by 'flutter test'.

* Remove leftover commented code

* Fix comment

* Lints
2018-03-01 09:04:26 -08:00
Alexandre Ardhuin
3c379aaf43
whitespace cleanup (#14458) 2018-02-05 22:20:21 +01:00
Ian Hickson
a9c1399243
Improve test.dart output (#14333)
It adds lines like `SHARD=analyze` to each shard, and a message like `Contents of packages/flutter_localizations/lib/src/l10n/localizations.dart matches output of gen_localizations.dart script.`  to the analysis shard.
2018-01-29 21:14:41 -08:00
Ian Hickson
64e2e00d6f
Attempt to make flutter compatible with more git versions (#14273)
Fixes https://github.com/flutter/flutter/issues/14232

(I haven't tested this with older versions of git, I'm just going on
what @jason-simmons wrote in the bug.)
2018-01-26 16:59:56 -08:00
Ian Hickson
18c60d3301
Fix import statements in flutter_tools (#13911) 2018-01-17 10:17:52 -08:00
Leaf Petersen
ab874da7be
Roll Dart SDK to 2.0.0-dev.16.0, along with associated package updates (#13857)
Rolling the Dart SDK to 2.0, with associated package updates.  

https://groups.google.com/forum/#!topic/flutter-dev/E22RdKAYjs8
2018-01-10 14:31:28 -08:00
Leaf Petersen
1d8ac6d429
Remaining code changes for Dart 2.0 SDK roll. (#13741)
* Remaining code changes for Dart 2.0 SDK roll
2018-01-02 14:41:03 -08:00
amirh
56061759fc
Add an AnimatedIcon class and vitool (vector icon tool) to generate data for it (#13530) 2017-12-21 15:46:05 -08:00
Leaf Petersen
b3cfa785c4
Uncontroversial and backwards compatible 2.0 SDK fixes (#13723)
Small code changes as part of moving the framework SDK forward to a 2.0 dev version.
2017-12-21 13:39:03 -08:00
Greg Spencer
f00c90232c
Add a Dart script to prepare the flutter repo for packaging. (#13548)
This is the first step in a two-step process of moving the package preparation step from a recipe in chrome_infra to a dart script in the flutter repo. This will make it easier to make changes to the process. The second step is to change the infra recipe to call this script.

In addition, I added a step to the packaging process to run flutter create for each type of template so that any pub dependencies of the templates get added to the cache that gets packaged (and thus users can run flutter create --offline and have it work).

Note that the actual packaging into a "tar" or "zip" file now happens here, so a developer could actually run this script on their machine to create a package.
2017-12-15 15:01:30 -08:00
amirh
81e2da9dd9
when plugins are out of date, show the command line to update (#13572) 2017-12-14 10:34:35 -08:00
Michael Goderbauer
e5846d962e
Verify that committed GeneratedPluginRegistrant are up-to-date (#13541) 2017-12-13 17:49:54 -08:00
Alexander Thomas
425bd5a821 Make it possible to specify multiple test arguments in test.dart (#13383)
This removes the FLUTTER_TEST_ARGS environment variable handling.
2017-12-08 15:49:29 -08:00
Greg Spencer
f29ecba6de
Use .pub-cache from Flutter root, if it exists. (#13358)
The purpose of this PR is to make it so that when the user runs 'flutter', if they have a .pub-cache directory in their flutter root, we use that instead of the default location for the pub cache. Otherwise, it should act as before.

The eventual goal is to support a pre-populated flutter .zip/.tar.gz file that has everything the developer needs in one bundle. In order for that to actually work, we need to have the pub cache be self-contained, and not in the user's home dir.

Another advantage of this is that if you have multiple flutter repos that you're switching between, then the versions in the pub cache will remain static when you switch between them.

This is an attempt to re-land: #13248. Includes a fix for the test that makes it work on bots in the presence of PUB_CACHE being set, and no other changes.
2017-12-05 14:46:39 -08:00
Greg Spencer
c89cf6ccc6
Reverting my .pub-cache change to figure out why it's still failing. (#13355)
* Revert "Add tests."

This reverts commit 31bad961ff.

* Revert "Use .pub-cache from Flutter root, if it exists. (#13248)"

This reverts commit 72d6bcc3f7.
2017-12-05 12:51:18 -08:00
Greg Spencer
72d6bcc3f7
Use .pub-cache from Flutter root, if it exists. (#13248)
The purpose of this PR is to make it so that when the user runs 'flutter', if they have a .pub-cache directory in their flutter root, we use that instead of the default location for the pub cache. Otherwise, it should act as before.

The eventual goal is to support a pre-populated flutter .zip/.tar.gz file that has everything the developer needs in one bundle. In order for that to actually work, we need to have the pub cache be self-contained, and not in the user's home dir.

Another advantage of this is that if you have multiple flutter repos that you're switching between, then the versions in the pub cache will remain static when you switch between them.
2017-12-05 12:02:14 -08:00
Greg Spencer
19cac92793
Switching coverage runs from Travis to infrabots. (#13038) 2017-11-15 21:15:11 -08:00
Greg Spencer
e2b9f8906d
Turn on concurrency for coverage shard so that it runs in parallel to fix Travis timeouts. (#13001) 2017-11-13 13:20:38 -08:00
Alexandre Ardhuin
15601fe55c
Enable lint prefer asserts in initializer lists (#12903)
* enable lint prefer_asserts_in_initializer_lists

* enable --assert-initializer
2017-11-08 22:59:49 +01:00
Yegor
41bd66f210
remove locale "sd" (not supported by ICU/CLDR); unify localizations script options (#12803)
* remove locale "sd" (not supported by ICU/CLDR); unify localizations scripts CLI

* address comments
2017-10-31 20:23:58 -07:00
Hans Muller
c3d56b1dad flutter_localization optional package (#12410) 2017-10-11 16:01:13 -07:00
Yegor
f4f20c2909 misc .arb fixes; localizations validator (#12197)
* misc .arb fixes; localizations validator

* regenerate localizations

* address comments

* do not treat plural variations as invalid keys
2017-09-22 12:26:47 -07:00
Alexandre Ardhuin
cde6b669b3 unnecessary statements (#12189) 2017-09-21 08:33:56 +02:00
Ian Hickson
db88414131 Upgrade to the most recent test package. (#11526)
Also, add tests to verify that our coverage is actually being tested!
2017-08-04 16:33:38 -07:00
Todd Volkert
7f0c98ab0b Don't run coverage or docs in OS-X Travis instance (#11144) 2017-07-10 16:20:14 -07:00
Ian Hickson
2c4ec1c9c2 Avoid self-referential imports. (#11045)
And add a test to verify we don't do this again.
2017-06-30 14:42:22 -07:00
Todd Volkert
bd67926f84 Run coverage in a dedicated shard on Travis (#10755) 2017-06-15 17:54:45 -07:00
Ian Hickson
9ac16680d2 Analyze sample code (#10619) 2017-06-12 16:52:35 -07:00