Commit Graph

38 Commits

Author SHA1 Message Date
Jason Simmons
5a04b4dda9
Disable DevTools when running the hot restart integration test in flutter_tools (#153247)
When DevTools is active HotRunner.attach makes a deferred RPC to a DevTools service.  That RPC appears to cause issues if it executes at the wrong time during the hot restart.

Passing the --no-devtools flag works around this by disabling the RPC.

See https://github.com/flutter/flutter/issues/153049
2024-08-12 19:57:22 +00:00
Andrew Kolos
13beab1ecc
add verbose logging to select hot reload/hot restart tests (#147673)
In service of https://github.com/flutter/flutter/issues/146879 and https://github.com/flutter/flutter/issues/145812. In these issues, we see what appears to be the flutter tool getting stuck somewhere during hot reload. It may help if we knew were exactly where we are getting stuck (preparing assets, writing them to device, etc.).

This PR adds a new parameter to `FlutterTestDriver::run`, `verbose`. When verbose is set, `FlutterTestDriver` will run `flutter` with `--verbose` in its tests. Keep in mind that `FlutterTestDriver` only prints logs from `flutter` when a test fails, so this shouldn't spam the logs of passing tests.

This PR sets the parameter when invoking the flaky tests from https://github.com/flutter/flutter/issues/146879 and #145812, so we should see more detailed logs in future flakes.

While this is a low risk PR, you can verify the change by intentionally breaking hot reload code, clearing the cached tool binaries, and then running either of these tests.
2024-05-02 04:03:32 +00:00
Ahmed Ashour
b9ead37244
Simplify null check. (#117026)
* Simplify null check.

* Simplify null check.

* Simplify null check.

* Fix.
2023-01-03 20:51:48 +00:00
Jonah Williams
9f28b83c19
[flutter_tools] migrate some integration tests to null safety (#103560) 2022-05-13 09:39:10 -07:00
Jenn Magder
c6ced845e3
Remove custom unawaited, prefer dart:async version (#103212) 2022-05-07 08:49:04 -07:00
Ian Hickson
f25b833f27
Enable avoid_print lint. (#91444) 2021-10-07 16:48:04 -07:00
Mouad Debbar
c2ea78d231
Revert "Enable avoid_print lint. (#91332)" (#91438)
This reverts commit cb378edc9e.
2021-10-07 16:16:17 -04:00
Ian Hickson
cb378edc9e
Enable avoid_print lint. (#91332) 2021-10-07 09:53:03 -07:00
Greg Spencer
88f3811055
Turn on avoid_dynamic_calls lint, except packages/flutter tests, make appropriate changes. (#84476)
This adds avoid_dynamic_calls to the list of lints, and fixes all instances where it was violated.

Importantly, this lint is NOT turned on for flutter/packages/test, because those changes are happening in another PR: #84478
2021-06-14 14:16:57 -07:00
Jonah Williams
74bd7b6f6d
[flutter_tools] opt all flutter tool libraries and tests out of null safety. (#74832)
* opt out the flutter tool

* oops EOF

* fix import

* Update tool_backend.dart

* Update daemon_client.dart

* fix more
2021-01-27 15:17:53 -08:00
Jonah Williams
a19f5baccc
[flutter_tools] connect widget cache from frontend_server (#65951) 2020-09-19 11:02:04 -07:00
Jonah Williams
6b444c4dd7
[flutter_tools] standardize patterns for integration.shard (#64980)
Integration tests must only go through the real file system/process manager/platform. The global indirection makes this code harder to understand than if it directly referred to the concrete instances that are being used.

Update the integration shard to use a const instance of a LocalFIleSystem, LocalProcessManager, and LocalPlatform. Remove global usage and apply testWithoutContext.
2020-09-08 15:56:00 -07:00
Jonah Williams
a7db3591cb
[flutter_tools] deflake fastReassemble test (#62152) 2020-07-24 15:17:39 -07:00
Danny Tuppeny
e8eb876489
Fix build (fix references to _flutter -> flutter) (#61568) 2020-07-15 12:45:55 -07:00
Danny Tuppeny
51fcf8fa7a
Add debounce support to daemon hot reload requests (#55376) 2020-07-15 11:56:05 -07:00
Jonah Williams
485034cab3
[flutter_tools] update fastReassemble method for single widget reloads (#61413)
For #61407 , we need to be able to find all widgets that of a given type. Previously I experimented with using the type name, but of course this does not handles subtypes. The actual check needs to be an is check.

Since there is no way to convert a String to a Type at runtime for use in this check, we can instead evaluate an expression which assigns a closure to a field. The idea for this was inspired by how the dart devtools adds debug functionality to older versions of flutter.

Since the reload feature is not complete yet, adds an integration test which simulates how it will eventually behave
2020-07-14 12:25:13 -07:00
Jonah Williams
ffcf1db3ca
[flutter_tools] reland migrate FlutterViews to package:vm_service (#55797)
Move FlutterView and related RPCs to the package:vm_service implementation. Update some getIsolate calls with catchError to match previous behavior.

- Updates tests that were previously mocking FlutterViews to use real views
- Moves the FlutterView cache from VM to FlutterDevice
- Catch SentinelException during Isolate.kill
2020-04-27 17:41:42 -07:00
Jenn Magder
958ab9336f
Revert "[flutter_tools] reland migrate FlutterView to new vmservice (#55774)" (#55788)
This reverts commit a18e6361cf.
2020-04-27 16:19:25 -07:00
Jonah Williams
a18e6361cf
[flutter_tools] reland migrate FlutterView to new vmservice (#55774) 2020-04-27 15:54:59 -07:00
Jonah Williams
07c451fea9
Revert "[flutter_tools] migrate FlutterView to new vm_service (#55341)" (#55772)
This reverts commit 2e50fd75eb.
2020-04-27 14:26:56 -07:00
Jonah Williams
2e50fd75eb
[flutter_tools] migrate FlutterView to new vm_service (#55341)
Move FlutterView and related RPCs to the package:vm_service implementation. Update some getIsolate calls with catchError to match previous behavior.

- Updates tests that were previously mocking FlutterViews to use real views
- Moves the FlutterView cache from VM to FlutterDevice
- Catch SentinelException during Isolate.kill
2020-04-27 14:16:28 -07:00
Jonah Williams
35bf5ab5d0
[flutter-tools] add awaits to debug a potential timing issue (#52047) 2020-03-05 15:24:28 -08:00
Jonah Williams
cc52a903a8
[flutter_tools] add status logs to determine where test is getting stuck (#51984) 2020-03-04 18:59:18 -08:00
Jonah Williams
4e5cb2b299
[flake] attempt to de-flake hot reload test (#51608) 2020-02-27 18:30:42 -08:00
Jonah Williams
fe1e8f3bb7
[flutter_tools] add logging to integration test (#51527) 2020-02-27 08:54:24 -08:00
Jonah Williams
53457c2241
[flutter_tools] Reland initialize frontend_sever with build (#51477) 2020-02-26 08:06:03 -08:00
Jonah Williams
421056ee54
Revert "[flutter_tools] initialize frontend server with build (#49405)" (#51476)
This reverts commit 59cc3cdf01.
2020-02-26 07:24:18 -08:00
Jonah Williams
59cc3cdf01
[flutter_tools] initialize frontend server with build (#49405) 2020-02-24 14:21:33 -08:00
Alexandre Ardhuin
f15c887c63
change quote to avoid escapes (#50368) 2020-02-11 20:58:27 +01:00
Jonah Williams
81aa2710d2
[flutter_tool] add a vmservice API for hot ui requests (#45649) 2019-12-09 21:31:34 -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
Jonah Williams
35b571ccfc
Revert "Improve time to development by initializing frontend_server concurrently with platform build (#45236)" (#45422) 2019-11-22 13:36:12 -08:00
Jonah Williams
60869e0a93
Improve time to development by initializing frontend_server concurrently with platform build (#45236) 2019-11-22 12:26:31 -08: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
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
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