Commit graph

1052 commits

Author SHA1 Message Date
Jackson Gardner 5a9fa1e7bf
Dual compile reland (#143262)
This is an attempt at a reland of https://github.com/flutter/flutter/pull/141396

The main changes here that are different than the original PR is fixes to wire up the `flutter test` command properly with the web renderer.
2024-02-13 20:02:10 +00:00
Jenn Magder 2fc19619e8
Set plugin template minimum iOS version to 12.0 (#143167)
Fixes https://github.com/flutter/flutter/issues/140474

See https://github.com/flutter/flutter/pull/122625 where this was done 11->12.
2024-02-09 18:32:10 +00:00
Jackson Gardner 2efeeb47bc
Revert Dual Web Compile changes (#143175)
Dual Web Compile has had some issues where `flutter test` is not respecting the `--web-renderer` flag for some reason. I haven't gotten entirely to the bottom of the issue, but for now we need to rever these changes while I investigate. This reverts the following PRs:

https://github.com/flutter/flutter/pull/143128
https://github.com/flutter/flutter/pull/141396

While doing this revert, I had a few merge conflicts with https://github.com/flutter/flutter/pull/142760, and I tried to resolve the merge conflicts within the spirit of that PR's change, but @chingjun I might need your input on whether the imports I have modified are okay with regards to the change you were making.
2024-02-08 21:45:09 +00:00
keyonghan e64a372d6b
Enable the whole logcat log (#143119)
Help with https://github.com/flutter/flutter/issues/142572.
2024-02-08 19:10:07 +00:00
Jackson Gardner ba626dc83a
Wasm/JS Dual Compile with the flutter tool (#141396)
This implements dual compile via the newly available flutter.js bootstrapping APIs for intelligent build fallback.
* Users can now use the `FlutterLoader.load` API from flutter.js
* Flutter tool injects build info into the `index.html` of the user so that the bootstrapper knows which build variants are available to bootstrap
* The semantics of the `--wasm` flag for `flutter build web` have changed:
  - Instead of producing a separate `build/web_wasm` directory, the output goes to the `build/web` directory like a normal web build
  - Produces a dual build that contains two build variants: dart2wasm+skwasm and dart2js+CanvasKit. The dart2wasm+skwasm will only work on Chrome in a cross-origin isolated context, all other environments will fall back to dart2js+CanvasKit.
  - `--wasm` and `--web-renderer` are now mutually exclusive. Since there are multiple build variants with `--wasm`, the web renderer cannot be expressed via a single command-line flag. For now, we are hard coding what build variants are produced with the `--wasm` flag, but I plan on making this more customizable in the future.
* Build targets now can optionally provide a "build key" which can uniquely identify any specific parameterization of that build target. This way, the build target can invalidate itself by changing its build key. This works a bit better than just stuffing everything into the environment defines because (a) it doesn't invalidate the entire build, just the targets which are affected and (b) settings for multiple build variants don't translate well to the flat map of environment defines.
2024-02-02 01:52:28 +00:00
Victoria Ashworth e5c286e02e
Upload DerivedData logs in CI (#142643)
When the Dart VM is not found within 10 minutes in CI on CoreDevices (iOS 17+), stop the app and upload the logs from DerivedData. The app has to be stopped first since the logs are not put in DerivedData until it's stopped.

Also, rearranged some logic to have CoreDevice have its own function for Dart VM url discovery.

Debugging for https://github.com/flutter/flutter/issues/142448.
2024-02-01 21:31:28 +00:00
Jenn Magder 3d41ed9635
Remove verbose-system-logs on iOS perf tests (#142739)
https://github.com/flutter/flutter/issues/129836 was closed in October.
2024-02-01 19:48:18 +00:00
Jonah Williams 7208d3b73c
[Impeller] opt vulkan tests into GPU tracing. (#142649)
We're going to disable GPU tracing by default. Opt our benchmarks back in so that we have continuity.
2024-02-01 00:48:01 +00:00
Matan Lurey 2f6fdf2650
Start renaming by adding a new bringup: true as an Android emulator. (#142257)
Part 2 of https://github.com/flutter/flutter/issues/142178.

Supersedes https://github.com/flutter/flutter/pull/142078.

Feedback welcome to avoid reverts!
2024-01-26 01:07:08 +00:00
Pierrick Bouvier 37c3978b34
Enable native compilation for windows-arm64 (#141930)
It's now possible to natively compile a flutter app for windows-arm64. Cross-compilation is not yet implemented.

Uses arm64 artifacts now available for Dart/Flutter. Platform detection is based on Abi class, provided by Dart. Depending if Dart is an arm64 or x64 binary, the Abi is set accordingly. Initial bootstrap of dart artifacts (update_dart_sdk.ps1) is checking PROCESSOR_ARCHITECTURE environment variable, which is the way to detect host architecture on Windows.

This is available only for master channel (on other channels, it fallbacks to windows-x64).

On windows-x64, it produces an x64 app. On windows-arm64, it produces an arm64 app.
2024-01-26 00:08:20 +00:00
auto-submit[bot] db25540919
Reverts "Reverts "Rename integration_tests/external_ui but do not touch anything else..."" (#142268)
Reverts flutter/flutter#142265
Initiated by: matanlurey
This change reverts the following previous change:
Original Description:
Reverts flutter/flutter#142238
Initiated by: eliasyishak
This change reverts the following previous change:
Original Description:
Part of https://github.com/flutter/flutter/issues/142178.
2024-01-25 22:28:27 +00:00
auto-submit[bot] f8544df0ea
Reverts "Rename integration_tests/external_ui but do not touch anything else..." (#142265)
Reverts flutter/flutter#142238
Initiated by: eliasyishak
This change reverts the following previous change:
Original Description:
Part of https://github.com/flutter/flutter/issues/142178.
2024-01-25 22:10:17 +00:00
Matan Lurey f61d2f53c6
Rename integration_tests/external_ui but do not touch anything else... (#142238)
Part of https://github.com/flutter/flutter/issues/142178.
2024-01-25 13:08:16 -08:00
Matan Lurey b3da19f879
Refactor external_ui without making any name changes (I think) (#142192)
Work towards https://github.com/flutter/flutter/issues/142178.

---

This PR makes no _behavioral_ changes to executed code, and instead
focuses on organization and naming:

1. Extended the README to explain the intent of the test, as well as how
to run it
1. Renamed `main.dart` and `main_test.dart` to `frame_rate_main.dart`
and `frame_rate_test.dart` (we'll add more)
1. Did some refactoring of the test to make it more obvious what is
being asserted (i.e. `widgetBuilds` and friends)
2024-01-24 17:14:16 -08:00
godofredoc d51858c2e1
Migrate android views to devicelab. (#142081)
Migrate android view out of recipes.
2024-01-24 23:11:12 +00:00
auto-submit[bot] 54e9f2dbe6
Reverts "Refactor external_uiexternal_textures" (#142173)
Reverts flutter/flutter#142062
Initiated by: eliasyishak
This change reverts the following previous change:
Original Description:
This PR makes no _behavioral_ changes to executed code, and instead focuses on organization and naming:

1. Almost[^1] anything named `external_ui` is renamed `external_textures`
1. Extended the README to explain the intent of the test, as well as how to run it
1. Renamed `main.dart` and `main_test.dart` to `frame_rate_main.dart` and `frame_rate_test.dart` (we'll add more)
1. Did some refactoring of the test to make it more obvious what is being asserted (i.e. `widgetBuilds` and friends)

Given how complex (and in-flux) this directory is, I'm also requesting either John, Jonah or I review any changes.

[^1]: Except the name of the `.ci.yaml` task, i.e. `name: Linux_pixel_7pro external_ui_integration_test` because I'm apparently not able to change that without creating a new task as `bringup: true` and playing a bit of a dance. Maybe that's worth doing though (in future PRs)?
2024-01-24 21:41:17 +00:00
Matan Lurey 2e2042ff8e
Refactor external_uiexternal_textures (#142062)
This PR makes no _behavioral_ changes to executed code, and instead
focuses on organization and naming:

1. Almost[^1] anything named `external_ui` is renamed
`external_textures`
1. Extended the README to explain the intent of the test, as well as how
to run it
1. Renamed `main.dart` and `main_test.dart` to `frame_rate_main.dart`
and `frame_rate_test.dart` (we'll add more)
1. Did some refactoring of the test to make it more obvious what is
being asserted (i.e. `widgetBuilds` and friends)

Given how complex (and in-flux) this directory is, I'm also requesting
either John, Jonah or I review any changes.

[^1]: Except the name of the `.ci.yaml` task, i.e. `name:
Linux_pixel_7pro external_ui_integration_test` because I'm apparently
not able to change that without creating a new task as `bringup: true`
and playing a bit of a dance. Maybe that's worth doing though (in future
PRs)?
2024-01-24 12:44:31 -08:00
auto-submit[bot] 1901d6fa10
Reverts "Enable native compilation for windows-arm64 " (#141809)
Reverts flutter/flutter#137618
Initiated by: Jasguerrero
This change reverts the following previous change:
Original Description:
It's now possible to natively compile a flutter app for
windows-arm64. Cross-compilation is not yet implemented.

Uses arm64 artifacts now available for Dart/Flutter.
Platform detection is based on Abi class, provided by Dart. Depending if
Dart is an arm64 or x64 binary, the Abi is set accordingly.
Initial bootstrap of dart artifacts (update_dart_sdk.ps1) is checking
PROCESSOR_ARCHITECTURE environment variable, which is the way to detect
host architecture on Windows.

This is available only for master channel (on other channels, it
fallbacks to windows-x64).

On windows-x64, it produces an x64 app. On windows-arm64, it produces an
arm64 app.
2024-01-18 22:48:16 +00:00
Pierrick Bouvier 540559204e
Enable native compilation for windows-arm64 (#137618)
It's now possible to natively compile a flutter app for
windows-arm64. Cross-compilation is not yet implemented.

Uses arm64 artifacts now available for Dart/Flutter.
Platform detection is based on Abi class, provided by Dart. Depending if
Dart is an arm64 or x64 binary, the Abi is set accordingly.
Initial bootstrap of dart artifacts (update_dart_sdk.ps1) is checking
PROCESSOR_ARCHITECTURE environment variable, which is the way to detect
host architecture on Windows.

This is available only for master channel (on other channels, it
fallbacks to windows-x64).

On windows-x64, it produces an x64 app. On windows-arm64, it produces an
arm64 app.
2024-01-18 19:15:23 +00:00
Spt 3d112429cc
Solve the problem that <Flutter/Flutter.h> cannot be imported when a pod transitive depends on Flutter (#125610)
![image](https://user-images.githubusercontent.com/8318578/234780282-89b18d27-df49-4b4e-88b5-c9d17cf3334f.png)
![image](https://user-images.githubusercontent.com/8318578/234780668-901ab816-5b6b-4d87-a6f4-120b5852580c.png)
If a pod transitive depends on a pod containing a framework, cocoapods will add the path of the framework to its FRAMEWORK_SEARCH_PATHS.
So I modified the relevant logic in podhelper, hoping to be consistent with the behavior of cocoapods.

Fixes https://github.com/flutter/flutter/issues/126251.
2024-01-16 15:36:38 +00:00
Anis Alibegić 81d80c587d
Fixed a lot of typos (#141431)
Fair amount of typos spotted and fixed. Some of them are in comments, some of them are in code and some of them are in nondart files.

There is no need for issues since it's a typo fix.

I have doubts about [packages/flutter_tools/lib/src/ios/core_devices.dart](https://github.com/flutter/flutter/compare/master...anisalibegic:flutter:master#diff-fdbc1496b4bbe7e2b445a567fd385677af861c0093774e3d8cc460fdd5b794fa), I have a feeling it might broke some things on the other end, even though it's a typo.
2024-01-12 22:10:25 +00:00
stuartmorgan 24e06232a7
Fix local engine use in macOS plugins (#140222)
Currently podhelper.rb will always point plugin builds at the cached engine artifacts, even when using `--local-engine`. In most cases this is fine, since when the final build actually runs it will be using the engine bundled into the app build, which will be the correct local engine build. When trying to test a local engine build with API additions against a local plugin modified to use those additions to ensure that they are working as expected, however, compilation will fail, because the new APIs won't be present in the plugin build.

This fixes that for macOS, and adds a TODO for iOS (which is more complicated to fix due to the host vs target build distinction).

macOS portion of https://github.com/flutter/flutter/issues/132228
2024-01-04 15:40:08 +00:00
John McCutchan dcc2c91471
Verified input test take 2 (#140836)
This is a reland of https://github.com/flutter/flutter/pull/140806 which had an issue with package versions.
2024-01-03 01:17:08 +00:00
auto-submit[bot] 8e431e106e
Reverts "Verified input integration test" (#140833)
Reverts flutter/flutter#140806
Initiated by: zanderso
This change reverts the following previous change:
Original Description:
This is an integration test associated with https://github.com/flutter/engine/pull/49268
2024-01-02 22:44:18 +00:00
John McCutchan ac9a8eb669
Verified input integration test (#140806)
This is an integration test associated with
https://github.com/flutter/engine/pull/49268
2024-01-02 14:20:35 -08:00
Jenn Magder 0cd2ea960b
Set compile test iOS app target version to not embed Swift runtime (#140188)
ObjC->Swift plugin migration caused a size regression in the gallery app because the Swift runtime was also pulled in.  

The gallery app minimum target version is iOS 11.0, which predates Swift ABI compatibility.  Pre iOS 12.2 apps embedded the Swift runtime since there wasn't one available to use in the OS.  

Add  `FLUTTER_XCODE_IPHONEOS_DEPLOYMENT_TARGET` to the compile perf test environment, which gets translated by the tool to an Xcode build setting:
```
[2023-12-14 15:52:14.797318] [STDOUT] stdout:                IPHONEOS_DEPLOYMENT_TARGET = 12.2
```

On my machine on main
```
    "release_size_bytes": 43717389,
```
becomes
```
    "release_size_bytes": 40679432,
```

Fixes https://github.com/flutter/flutter/issues/139605
2023-12-15 05:04:33 +00:00
Victoria Ashworth 410af14fd8
Select simulator runtime for tests based on Xcode's preferred runtime build (#139919)
When creating a simulator for a test, select the runtime based on the selected Xcode's preferred build. This is to prevent it from using a runtime greater than its greatest supported version.

Fixes https://github.com/flutter/flutter/issues/139917.

Example test with both iOS 16 and 17 available: https://chromium-swarm.appspot.com/task?id=6672aca184395a10
2023-12-12 20:05:58 +00:00
Daco Harkes 6ad755536e
Native assets support for Android (#135148)
Support for FFI calls with `@Native external` functions through Native assets on Android. This enables bundling native code without any build-system boilerplate code.

For more info see:

* https://github.com/flutter/flutter/issues/129757

### Implementation details for Android.

Mainly follows the design of the previous PRs.

For Android, we detect the compilers inside the NDK inside SDK.

And bundling of the assets is done by the flutter.groovy file.

The `minSdkVersion` is propagated from the flutter.groovy file as well.

The NDK is not part of `flutter doctor`, and users can omit it if no native assets have to be build.
However, if any native assets must be built, flutter throws a tool exit if the NDK is not installed.

Add 2 app is not part of this PR yet, instead `flutter build aar` will tool exit if there are any native assets.
2023-12-07 16:29:11 +00:00
Jonah Williams c421f65b3b
Add Impeller complex layout impeller benchmarks. (#139490)
These benchmarks do a nice job of showing CPU overhead, which is useful for many of the microoptimizations we've been doing.
2023-12-04 19:23:26 +00:00
Ian Hickson 5e216d44ca
Simplify devicelab logic and fix tests (#139122)
- fix https://github.com/flutter/flutter/issues/53707 by having the test not expect a timeout but instead actually look for the retry message
- simplify the `--task` option to only accept task names rather than also accepting paths
- remove some obsolete options that referred to the manifest which no longer seems to exist
2023-11-29 08:41:27 +00:00
Nate 3267fbc07a
Implement switch expressions in dev/ (#139048)
I previously made a PR (#136140) that used `switch` expressions to make some parts of the Flutter codebase easier to understand. It was assigned to the framework team, and @christopherfujino let me know that it was too large to effectively review and recommended breaking it up into smaller pull requests.

Here's a PR that only targets files in the `dev/` directory. Hopefully this will be easier to work with!

(solves issue https://github.com/flutter/flutter/issues/136139)
2023-11-28 23:40:28 +00:00
Jonah Williams 925f3eee66
[benchmarks] disable partial repaint for multiple backdrop blur iOS macrobenchmarks. (#137902)
Partial repaint is too effective, and we'd like to be able to measure performance without carefully structuring the benchmarks. For example, right now partial repaint is culling any blurs in the multibackdrop case, which we should be using to track  https://github.com/flutter/flutter/issues/132735
2023-11-06 19:49:15 +00:00
Daco Harkes 7634609062
Pin dart-lang/native dependencies (#137601)
Pin the dependencies from dart-lang/native to a specific version during testing (rather than having them auto-upgrade during pub resolution). This will prevent tests using the template to start failing if a bad version is published to pub.

Closes: https://github.com/flutter/flutter/issues/137418

Also bumps dep in flutter_tools.
2023-11-03 22:16:04 +00:00
Jonah Williams 2be9b61309
Roll flutter gallery version forward. (#137846)
Adds some bottom sheet fixes and resizes oversized images.
2023-11-03 16:43:33 +00:00
Victoria Ashworth 5dd2a4e0aa
Ensure Xcode project is setup to start debugger (#136977)
Some users have their Xcode settings set to not debug (see example here https://github.com/flutter/flutter/issues/136197#issuecomment-1766834195). This will cause the [engine check for a debugger](22ce5c6a45/runtime/ptrace_check.cc (L56-L71)) to fail, which will cause an error and cause the app to crash.

This PR parses the scheme file to ensure the scheme is set to start a debugger and warn the user if it's not.

Fixes https://github.com/flutter/flutter/issues/136197.
2023-10-25 17:08:57 +00:00
auto-submit[bot] bfc4c502c6
Reverts "[gallery] Reland roll gallery to ecfb9e5352bd12032301b12b30d5853d83d89bda" (#137264)
Reverts flutter/flutter#137199
Initiated by: zanderso
This change reverts the following previous change:
Original Description:
Reverts flutter/flutter#133095

Dependencies have been fixed, hopefully : https://github.com/flutter/flutter/issues/133096#event-10761117209
2023-10-25 16:41:20 +00:00
Jonah Williams aaf7184a42
[gallery] Reland roll gallery to ecfb9e5352bd12032301b12b30d5853d83d89bda (#137199)
Reverts flutter/flutter#133095

Dependencies have been fixed, hopefully : https://github.com/flutter/flutter/issues/133096#event-10761117209
2023-10-25 16:05:22 +00:00
Jonah Williams 841cc675b3
[Impeller] add OpenGL GPU tracing to devicelab tests. (#136974)
Adds the metadata key required to enable OpenGLES GPU tracing. This is off by default because the API crashes on some GPU models, but it should be safe on the Pixel 7 (others TBD based on testing results).
2023-10-20 20:23:25 +00:00
Victoria Ashworth 3c3d414e7c
[Reland] Skip injecting Bonjour settings when port publication is disabled (#136842)
Reland https://github.com/flutter/flutter/pull/136751 with fixes.
2023-10-19 17:38:52 +00:00
auto-submit[bot] c32ffa65c9
Reverts "[Reland] Skip injecting Bonjour settings when port publication is disabled" (#136839)
Reverts flutter/flutter#136751
Initiated by: vashworth
This change reverts the following previous change:
Original Description:
Reland of https://github.com/flutter/flutter/pull/136562 with fixes.
2023-10-18 20:33:17 +00:00
Victoria Ashworth 1599cbebc3
[Reland] Skip injecting Bonjour settings when port publication is disabled (#136751)
Reland of https://github.com/flutter/flutter/pull/136562 with fixes.
2023-10-18 20:08:19 +00:00
auto-submit[bot] 54c0a350dd
Reverts "Skip injecting Bonjour settings when port publication is disabled" (#136750)
Reverts flutter/flutter#136562
Initiated by: vashworth
This change reverts the following previous change:
Original Description:
Some of our tests in CI are triggering the `NSLocalNetworkUsageDescription` dialog when they're not supposed to (https://github.com/flutter/flutter/issues/129836) since it's disabled via flags (`--no-publish-port` for flutter/flutter and `--disable-vm-service-publication` for flutter/engine).

Normally, we inject `NSLocalNetworkUsageDescription` (and other bonjour settings) to the Info.plist during the project build for debug and profile mode since by default they will publish the VM Service port over mDNS.

To help diagnose the issue, though, this PR changes it so that we don't inject `NSLocalNetworkUsageDescription` (and other bonjour settings) when port publication is disabled since it shouldn't be needed. Hopefully, this will give us better error messages or cause the app to crash and end the test early (rather than timeout after 30 minutes).
2023-10-17 19:27:19 +00:00
Victoria Ashworth 0383d8ba9e
Skip injecting Bonjour settings when port publication is disabled (#136562)
Some of our tests in CI are triggering the `NSLocalNetworkUsageDescription` dialog when they're not supposed to (https://github.com/flutter/flutter/issues/129836) since it's disabled via flags (`--no-publish-port` for flutter/flutter and `--disable-vm-service-publication` for flutter/engine).

Normally, we inject `NSLocalNetworkUsageDescription` (and other bonjour settings) to the Info.plist during the project build for debug and profile mode since by default they will publish the VM Service port over mDNS.

To help diagnose the issue, though, this PR changes it so that we don't inject `NSLocalNetworkUsageDescription` (and other bonjour settings) when port publication is disabled since it shouldn't be needed. Hopefully, this will give us better error messages or cause the app to crash and end the test early (rather than timeout after 30 minutes).
2023-10-17 19:09:08 +00:00
Jonah Williams 1956474409
Upload GPU frame times for Impeller on Android/iOS. (#136565)
These values will be 0 until https://github.com/flutter/engine/pull/46846 and https://github.com/flutter/engine/pull/46796 roll into the framework.
2023-10-14 17:09:26 +00:00
Victoria Ashworth ddc9b40a98
Fix typo in function name (#136273)
Rename `removeIOSimulator` to `removeIOSSimulator`.
2023-10-12 15:53:00 +00:00
Christopher Fujino 8ca7d7d136
Stop recommending android sdk root (#136296)
Fixes https://github.com/flutter/flutter/issues/117245
2023-10-11 21:04:59 +00:00
Victoria Ashworth e8bd5a3271
Delete simulator after plugin_test_ios (#136265)
Remove simulator once it's no longer needed for test `plugin_test_ios` .

Fixes https://github.com/flutter/flutter/issues/136224
2023-10-10 17:22:07 +00:00
Callum Moffat 2925525e35
Upload frame_request_pending_latency [attempt #2] (#135890)
These values are generated since https://github.com/flutter/flutter/pull/135279, but I didn't know to add the new keys to this list to get them to upload. 

Failed to do so in #135645, I believe the mistake there was putting them in `_kCommonScoreKeys`, which is also used in "E2E" tests, that don't get full trace data, only high level `FrameTiming` packets.

Part of https://github.com/flutter/flutter/issues/129150
2023-10-05 21:54:27 +00:00
Ricardo Amador 4e5e47e76a
Add device ready check (#135526)
*Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.*

*List which issues are fixed by this PR. You must list at least one issue.*
Fixes https://github.com/flutter/flutter/issues/121420

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
2023-09-30 01:58:52 +00:00
Zachary Anderson 63b98d55b0
Revert "Upload generated frame-request-pending stats" (#135672)
Reverts flutter/flutter#135645
2023-09-28 07:23:25 -07:00
Callum Moffat dd341d4295
Upload generated frame-request-pending stats (#135645)
These values are generated since https://github.com/flutter/flutter/pull/135279, but I didn't know to add the new keys to this list to get them to upload.

Part of https://github.com/flutter/flutter/issues/129150
2023-09-28 13:05:10 +00:00
Zachary Anderson 579e196073
Stop reporting new_gen_gc_count to SkiaPerf (#135324)
Movement in this metric is mostly noise, creates many false alerts, and is neither the cause nor effect of changes in other metrics.
2023-09-22 21:55:28 +00:00
Michael Goderbauer b0a90aee17
Enable strict-inference (#135043)
Avoids that dynamic accidentally sneaks in, see https://dart.dev/tools/analysis#enabling-additional-type-checks
2023-09-20 19:59:08 +00:00
Victoria Ashworth af5ac930d8
Set the CONFIGURATION_BUILD_DIR in generated xcconfig when debugging core device (#134493)
Xcode uses the CONFIGURATION_BUILD_DIR build setting to determine the location of the bundle to build and install. When launching an app via Xcode with the Xcode debug workflow (for iOS 17 physical devices), temporarily set the CONFIGURATION_BUILD_DIR to the location of the bundle so Xcode can find it.

Also, added a Xcode Debug version of the `microbenchmarks_ios` integration test since it uses `flutter run --profile` without using `--use-application-binary`.

Fixes https://github.com/flutter/flutter/issues/134186.
2023-09-13 18:08:35 +00:00
Daco Harkes aa36db1d29
Native assets support for MacOS and iOS (#130494)
Support for FFI calls with `@Native external` functions through Native assets on MacOS and iOS. This enables bundling native code without any build-system boilerplate code.

For more info see:

* https://github.com/flutter/flutter/issues/129757

### Implementation details for MacOS and iOS.

Dylibs are bundled by (1) making them fat binaries if multiple architectures are targeted, (2) code signing these, and (3) copying them to the frameworks folder. These steps are done manual rather than via CocoaPods. CocoaPods would have done the same steps, but (a) needs the dylibs to be there before the `xcodebuild` invocation (we could trick it, by having a minimal dylib in the place and replace it during the build process, that works), and (b) can't deal with having no dylibs to be bundled (we'd have to bundle a dummy dylib or include some dummy C code in the build file).

The dylibs are build as a new target inside flutter assemble, as that is the moment we know what build-mode and architecture to target.

The mapping from asset id to dylib-path is passed in to every kernel compilation path. The interesting case is hot-restart where the initial kernel file is compiled by the "inner" flutter assemble, while after hot restart the "outer" flutter run compiled kernel file is pushed to the device. Both kernel files need to contain the mapping. The "inner" flutter assemble gets its mapping from the NativeAssets target which builds the native assets. The "outer" flutter run get its mapping from a dry-run invocation. Since this hot restart can be used for multiple target devices (`flutter run -d all`) it contains the mapping for all known targets.

### Example vs template

The PR includes a new template that uses the new native assets in a package and has an app importing that. Separate discussion in: https://github.com/flutter/flutter/issues/131209.

### Tests

This PR adds new tests to cover the various use cases.

* dev/devicelab/bin/tasks/native_assets_ios.dart
  * Runs an example app with native assets in all build modes, doing hot reload and hot restart in debug mode.
* dev/devicelab/bin/tasks/native_assets_ios_simulator.dart
  * Runs an example app with native assets, doing hot reload and hot restart.
* packages/flutter_tools/test/integration.shard/native_assets_test.dart
  * Runs (incl hot reload/hot restart), builds, builds frameworks for iOS, MacOS and flutter-tester.
* packages/flutter_tools/test/general.shard/build_system/targets/native_assets_test.dart
  * Unit tests the new Target in the backend.
* packages/flutter_tools/test/general.shard/ios/native_assets_test.dart
* packages/flutter_tools/test/general.shard/macos/native_assets_test.dart
  * Unit tests the native assets being packaged on a iOS/MacOS build.

It also extends various existing tests:

* dev/devicelab/bin/tasks/module_test_ios.dart
   * Exercises the add2app scenario.
* packages/flutter_tools/test/general.shard/features_test.dart
   * Unit test the new feature flag.
2023-09-10 08:07:13 +00:00
Andrew Kolos aea4552acd
add --exit flag to dev/devicelab/bin/test_runner.dart (#134165)
Resolves #134070 

Adds a flag to the `test_runner.dart test` script that will cause the test runner to exit upon first failure (or, said another way, exit without retrying).

This is in parity with the `--exit` flag of `dev/devicelab/bin/run.dart`.
2023-09-07 19:38:05 +00:00
Andrew Kolos 445e02dd63
fix --exit flag in dev/devicelab/bin/run.dart (#134162)
Fixes #134154 

This PR also changes the default value of the `--exit` flag from `true` to `false`. Effectively, this is not a change in behavior since `--exit` didn't previously work.
2023-09-07 19:36:55 +00:00
Andrew Kolos c263c56dc6
give --task-args option in test_runner a help description (#133791)
Fixes https://github.com/flutter/flutter/issues/133790

Provides help text for the `--task-args` option of the `test_runner` devicelab command. The current help text is just copypasta from another option's help text
2023-08-31 21:08:59 +00:00
Jim Graham b51859ec33
Add benchmark for scrolling very long pictures (#133434)
This benchmark will track the performance of the RTree implementation to cull very large pictures down to just the portion visible on the screen.
2023-08-31 19:03:14 +00:00
Pierrick Bouvier 792e26df95
[Windows] Add target architecture to build path (#131843)
To implement windows-arm64 support, it is needed to add architecture as a subdirectory (https://github.com/flutter/flutter/issues/129805).

In short, when performing a flutter windows build, we have:
- Before: build/windows/runner/Release/gallery.exe
- After: build/windows/x64/runner/Release/gallery.exe

This convention follows what flutter linux build does.

Addresses: https://github.com/flutter/flutter/issues/129805
Addresses: https://github.com/flutter/flutter/issues/116196

Design doc: [flutter.dev/go/windows-arm64](https://flutter.dev/go/windows-arm64)
2023-08-31 09:09:02 -07:00
Victoria Ashworth c175cf87a6
Ignore macOS Cocoapods linting failure on DT_TOOLCHAIN_DIR error (#133588)
Xcode 15 introduced an [error](https://github.com/flutter/flutter/issues/132755) into Cocoapods when building macOS apps. 

When `pod lib lint` runs, it under the covers is building the app with `xcodebuild`, which is why this error occurs when linting.

A fix has been made in Cocoapods, but is not in an official release so we can't upgrade Cocoapods yet. This is to temporarily ignore lint failure due to that error.

Fixes https://github.com/flutter/flutter/issues/132980.

Tracking issue to upgrade Cocoapods when fix is in a release: https://github.com/flutter/flutter/issues/133584

Since Xcode 15 isn't in CI, I tested it in a one-off led test:
* [Pre-fix failure](https://chromium-swarm.appspot.com/task?id=6431f228ecf98e10)
* [Post-fix success](https://chromium-swarm.appspot.com/task?id=645ba7ebdab97210)
2023-08-31 14:57:07 +00:00
Jackson Gardner d8b1e81c1f
Add --experimental-wasm-type-reflection and support newer emscripten builds. (#133084)
This makes two changes to prepare for incoming changes to skwasm in the web engine:
* We will (at least for now) be depending on the `WebAssembly.Function` constructor in `skwasm`, which is hidden behind the `--experimental-wasm-type-reflection` flag. We need to pass that when running skwasm benchmarks.
* We are going to be upgrading the skwasm build to a newer version of emscripten, which exposes the wasm exports via the `wasmExports` property instead of the `asm` property. Make sure to support either, if passed.
2023-08-23 17:07:41 +00:00
Jonah Williams 5e9e959d57
Revert "[gallery] roll gallery to ecfb9e5352bd12032301b12b30d5853d83d89bda" (#133095)
Reverts flutter/flutter#133083

failing on cocoapods:

```
[2023-08-22 16:28:37.783355] [STDOUT] stdout: [        ] Error output from CocoaPods:
[2023-08-22 16:28:37.783379] [STDOUT] stdout:            ↳
[2023-08-22 16:28:37.783402] [STDOUT] stdout: [        ]     [!] The version of CocoaPods used to generate the lockfile (1.12.1) is higher than the version of the current executable (1.11.3). Incompatibility issues may arise.
[2023-08-22 16:28:37.783423] [STDOUT] stdout: 
[2023-08-22 16:28:37.783445] [STDOUT] stdout:                [!] Automatically assigning platform `iOS` with version `11.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
[2023-08-22 16:28:37.783469] [STDOUT] stdout: 
[2023-08-22 16:28:37.784059] [STDOUT] stderr: [        ] Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
[2023-08-22 16:28:37.784102] [STDOUT] stderr:            To update the CocoaPods specs, run:
[2023-08-22 16:28:37.784126] [STDOUT] stderr:              pod repo update
[2023-08-22 16:28:37.784147] [STDOUT] stderr: 
```

https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20new_gallery_ios__transition_perf/10590/overview
2023-08-22 23:36:00 +00:00
Jonah Williams 00a99d3bc0
[gallery] roll gallery to ecfb9e5352bd12032301b12b30d5853d83d89bda (#133083)
This shrinks the size of the reply image attachments which should make it easier to find the actionable issues in https://github.com/flutter/flutter/issues/132690
2023-08-22 22:32:01 +00:00
Jonah Williams 51a0ec006f
[devicelab] fix name of flutter driver benchmark. (#132527)
Missing the _test.dart
2023-08-14 17:03:48 -07:00
Jonah Williams f7bd03202f
[devicelab] boot up benchmarks. (#132148)
Enable Impeller benchmarks for drawAtlas/drawVertices on iOS/Metal, Android/GLES, and Android/Vulkan.

Enable impeller tessellation benchmarks on iOS/Metal and Android/Vulkan - not GLES as this is measuring backend agnostic performance.
2023-08-14 18:47:08 +00:00
Matan Lurey a7997f606e
Update dev/devicelab/** to provide --local-engine-host. (#132342)
Partial work towards https://github.com/flutter/flutter/issues/132245.

I have to admit I don't totally understand what I've updated, or whether
there are more integration points needed.
2023-08-10 17:25:30 -07:00
Victoria Ashworth d631b26285
New tooling for iOS 17 physical devices (#131865)
This PR includes the following changes. These changes only apply to iOS 17 physical devices.

| Command | Change Description  | Changes to User Experience |
| ------------- | ------------- | ------------- |
| `flutter run --release` | Uses `devicectl` to install and launch application in release mode.  | No change.  |
| `flutter run`  | Uses Xcode via automation scripting to run application in debug and profile mode. | Xcode will be opened in the background. Errors/crashes may be caught in Xcode and therefore may not show in terminal. |
| `flutter run --use-application-binary=xxxx` | Creates temporary empty Xcode project and use Xcode to run via automation scripting in debug and profile. | Xcode will be opened in the background. Errors/crashes may be caught in Xcode and therefore may not show in terminal.  |
| `flutter install` | Uses `devicectl` to check installed apps, install app, uninstall app.  | No change.  |
| `flutter screenshot` | Will return error.  | Will return error.  |

Other changes include:
* Using `devicectl` to get information about the device
* Using `idevicesyslog` and Dart VM logging for device logs

Note:
Xcode automation scripting (used in `flutter run` for debug and profile) does not work in a headless (without a UI) interface. No known workaround.

Fixes https://github.com/flutter/flutter/issues/128827, https://github.com/flutter/flutter/issues/128531.
2023-08-09 19:25:12 +00:00
gaaclarke 1ff82af540
[Impeller] Adds advanced blend benchmark (#131893)
issue: https://github.com/flutter/flutter/issues/131784

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2023-08-09 10:57:35 -07:00
gaaclarke f0e39349c9
[Impeller] Add animated_blur_backdrop_filter_perf execution on samsung vulkan and opengles (#131864)
issue: https://github.com/flutter/flutter/issues/131784
2023-08-03 22:31:06 +00:00
gaaclarke 4247e1eff1
Added new gallery benchmark test that forces opengles. (#131796)
fixes https://github.com/flutter/flutter/issues/131782

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat

---------

Co-authored-by: Xilai Zhang <xilaizhang@google.com>
2023-08-03 12:25:29 -07:00
gaaclarke 947367aaa2
Added standard deviation to rasterizer results. (#131781)
This calculation is important if you want to calculate the probability that one thing is better than another.
2023-08-02 16:40:07 +00:00
Jackson Gardner b928b3c1c3
Reland --omit-type-checks for benchmarks. (#131493)
Because the cost of type checks dominate our dart2wasm benchmarks, we've
decided to pass `--omit-type-checks` for now.

This was previously reverted because the skwasm benchmarks were broken
in general for a separate reason, and my getting rid of `bringup: true`
broke the tree. I ended up fixing the benchmarks and getting rid of
`bringup: true` in a separate commit, so this just adds the flag only.
2023-07-31 13:17:34 -07:00
Loïc Sharma 81b0e9f111
Revert "Run benchmarks with --omit-type-checks" (#131353)
Reverts flutter/flutter#131102 as it closed the tree due to `Linux web_benchmarks_skwasm` failures. The test seems to be timing out without completing.

Example failure: https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20web_benchmarks_skwasm/1/overview
2023-07-26 19:23:37 +00:00
Jackson Gardner 8046e13373
Run benchmarks with --omit-type-checks (#131102)
We've decided to use the `--omit-type-checks` flag for our dart2wasm benchmarks. Right now, many of the benchmark results are dominated by type checks and most of what we are actually trying to measure get drowned out in the noise.
2023-07-26 17:10:07 +00:00
Victoria Ashworth a903f1defb
Add verbose engine logs for iOS start up tests (#130511)
Added to be able to view logs from https://github.com/flutter/engine/pull/43616.

Added to debug https://github.com/flutter/flutter/issues/129836
2023-07-14 16:51:50 +00:00
Victoria Ashworth 6683468f0b
Add debugging for iOS startup test flakes (#130099)
Adding debugging for https://github.com/flutter/flutter/issues/129836.

Takes a screenshot when startup test takes too long (10 minutes).

Also, removes some old debugging and add new debugging message.
2023-07-07 16:49:00 +00:00
Jackson Gardner 1b887c72b5
Skwasm benchmarks. (#129681)
This enables benchmarks for the Skwasm renderer, compiled with
dart2wasm.

Platform views aren't supported in Skwasm yet, so we are skipping those
benchmarks for now.
2023-06-28 17:16:19 -07:00
Brandon DeRosier b898d1d270
[devicelab] Add platform view scroll benchmarks for Impeller on Android (#129455)
For tracking perf improvements with changes like
https://github.com/flutter/engine/pull/43152.
2023-06-23 18:40:17 -07:00
Victoria Ashworth cd18c8c02f
Workaround for Dart VM timeout (#127875)
Workaround solution for: https://github.com/flutter/flutter/issues/121231
See https://github.com/flutter/flutter/issues/120808#issuecomment-1551826299 Error Case 2 for more information.

Sometimes the `ios-deploy` process does not return the logs from the application. We've been unable to figure out why. This is a solution to workaround that by using `idevicesyslog` alongside `ios-deploy` as a backup in getting the log for the Dart VM url. As explained in https://github.com/flutter/flutter/issues/120808#issuecomment-1551826299, when error case 2 happens, the `idevicesyslog` does successfully find the Dart VM.

Also, in the comments of the code it mentions `syslog` is not written on iOS 13+, this was added in response to this issue: https://github.com/flutter/flutter/issues/41133.

However, `idevicesyslog` does in fact work (at least for iOS 16), we use it to collect device logs for our CI tests already: 1dc26f80f0/dev/devicelab/lib/framework/devices.dart (L998-L1006)
2023-06-02 17:17:57 +00:00
Jackson Gardner e8f4d803ba
Improve web benchmarks measurements (#127900)
By default, the browser fuzzes the timer APIs such that they have a granularity of approximately 100 microseconds (this is due to Spectre mitigation techniques). However, many of the thing we are trying to measure actually have a much finer granularity than 100 microseconds. As a result, many of our benchmarks are extremely noisy and don't provide accurate data.

By serving the initial script files with the `Cross-Origin-Opener-Policy: same-origin` and `Cross-Origin-Embedder-Policy: require-corp` HTTP headers, the browser runs the benchmarks in a `crossOriginIsolated` context, which restores the fine granularity of APIs such as `performance.now()` to microsecond precision.

Also, we were considering anything an outlier that was more than one standard deviation away from the mean. In a normal distribution, that means we are only capturing 68% of the data and the rest are considered outliers. This is not ideal. Doing two standard deviations away captures 95% of the data, and the outliers are in the remaining 5%, which seems much more reasonable.
2023-05-31 02:29:02 +00:00
Phil Quitslund 5bf6318688
Update collection-fors to prefer final (as per updated prefer_final_in_for_each) (#127511)
The newly updated lint will soon flag for-each in collections.

See discussion: https://github.com/dart-lang/linter/pull/4383

/cc @goderbauer
2023-05-26 23:34:36 +00:00
chunhtai c687dcd56f
Migrates android semanitcs integration to integration test (#127128)
I think the flake is due to setclipboard or semantics update race condition. I migrated the test to use integration test package which relies less on timing

fixes https://github.com/flutter/flutter/issues/124636
2023-05-23 22:33:19 +00:00
Jonah Williams 41abe998ee
[devicelab] add drawPoints benchmark (#126728)
Add a benchmark that measures the improvements from https://github.com/flutter/engine/pull/41803
2023-05-15 19:14:58 +00:00
Tomasz Gucio 99c7e9f088
Add spaces after flow control statements (#126320) 2023-05-15 11:07:30 +02:00
keyonghan 8ab782d08a
Migrate gallery ios tests to build+test (#111164)
Part of https://github.com/flutter/flutter/issues/103542
2023-05-10 00:50:11 +00:00
Jenn Magder 4f3c989bd3
Remove complex_layout_*__compile benchmarks (#126023)
Fixes https://github.com/flutter/flutter/issues/126020.
2023-05-03 23:49:01 +00:00
Zachary Anderson aef7929f3d
Report total_ui_gc_time to SkiaPerf (#125919)
Not sure why this wasn't already being reported.
2023-05-02 22:09:33 -07:00
Zachary Anderson 50f83fc277
Add back one Skia test on iOS (#125663)
Fixes https://github.com/flutter/flutter/issues/125648
2023-04-28 10:41:33 -07:00
Taha Tesser 457e98a1e7
Add Sliders to macrobenchmarks (#125296)
This adds a performance test for `Slider` and `RangeSlider` to run on Android.
This is to measure upcoming changes to these widgets and compare their performance. 

https://user-images.githubusercontent.com/48603081/233633349-0bcad3c3-04a9-42dd-acd0-46b76ce51178.mp4
2023-04-24 23:25:28 +00:00
Jenn Magder c60f202308
Force plugin transitive dependencies to an ARC compatible version (#124349)
Force plugin transitive dependencies to an ARC compatible version
2023-04-07 18:07:23 +00:00
Victoria Ashworth c52042fbfc
Make logs verbose for gallery tests (#124271)
Make logs verbose for gallery tests
2023-04-07 15:47:20 +00:00
Harry Terkelsen daaba8a4aa
Add --local-web-sdk in devicelab runner to make --ab testing work for web (#123825)
This allows us to check for performance differences in local Web SDKs.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2023-03-31 14:25:00 -07:00
Jonah Williams 54dbbd76b8
[devicelab] add regular old blur benchmark (#123879)
[devicelab] add regular old blur benchmark
2023-03-31 20:54:51 +00:00
Michael Goderbauer fda9ecfef7
Remove 1745 decorative breaks (#123259)
Remove 1745 decorative breaks
2023-03-22 21:12:22 +00:00
yusuf-goog 47dd992266
Adding timestamps to task runner output lines. (#123075)
Adding timestamps to task runner output lines.
2023-03-21 23:25:35 +00:00
Jonah Williams 67810d672b
delete sksl benchmarks (#123163)
delete sksl benchmarks
2023-03-21 22:52:18 +00:00
Victoria Ashworth 9136a47458
Set plugin template minimum iOS version to 11.0 (#122625)
Set plugin template minimum iOS version to 11.0
2023-03-21 16:40:50 +00:00
Loïc Sharma 2312097731
[Tool] [Windows] Output app path on build completion (#122928)
[Tool] [Windows] Output app path on build completion
2023-03-20 20:11:07 +00:00
Loïc Sharma 3635a3048e
Revert "[Tool] [Windows] Output app path on build completion (#122858)" (#122926)
Revert "[Tool] [Windows] Output app path on build completion"
2023-03-17 21:29:12 +00:00