8 Commits

Author SHA1 Message Date
5e88f948b8 Clean Xcode project before analyzing and testing (#6842)
On macOS 14, caching seems to be more aggressive with swiftmodules and can cause conflicts between tests. To mitigate this, use `xcodebuild clean` (cleans Derived Data for the project) as part of `xcodebuild analyze` and `xcodebuild test`.

Fixes https://github.com/flutter/flutter/issues/149270. Fixes https://github.com/flutter/flutter/issues/149266.
2024-06-04 15:32:05 +00:00
f224eea858 [tool] Add pigeon support to update-dependency (#3640)
[tool] Add pigeon support to update-dependency
2023-04-05 10:44:19 +00:00
ca9a81d653 [ci/tools] Add iOS/macOS analysis to catch deprecated code (#5778) 2022-05-18 08:47:12 -07:00
5ec6644f3f [tools] Convert test utils to RepositoryPackage (#5605) 2022-05-03 14:14:11 -07:00
199afd96f1 [flutter_plugin_tool] Fix iOS/macOS naming (#4861) 2022-02-15 17:20:24 -08:00
dcf97f741f [flutter_plugin_tool] Add support for building UWP plugins (#4047)
This allows building UWP plugin examples with `build-examples --winuwp`. As with previous pre-stable-template desktop support, this avoids the issue of unstable app templates by running `flutter create` on the fly before trying to build, so a template that will bitrot doesn't need to be checked in.

Also adds no-op "support" for `drive-examples --winuwp`, with warnings about it not doing anything. This is to handle the fact that the LUCI recipe is shared between Win32 and UWP, and didn't conditionalize `drive`. Rather than change that, then change it back later, this just adds the no-op support now (since changing the tooling is much easier than changing LUCI recipes currently).

This required some supporting tool changes:
- Adds the ability to check for the new platform variants in a pubspec
- Adds the ability to write test pubspecs that include variants, for testing

Part of https://github.com/flutter/flutter/issues/82817
2021-08-26 12:07:33 -07:00
74cf0287f9 [flutter_plugin_tools] Improve process mocking (#4254)
The mock process runner used in most of the tests had poor handling of
stdout/stderr:
- By default it would return the `List<int>` output from the mock
  process, which was never correct since the parent process runner
  interface always sets encodings, thus the `dynamic` should always be
  of type `String`
- The process for setting output on a `MockProcess` was awkward, since
  it was based on a `Stream<Lint<int>>`, even though in every case what
  we actually want to do is just set the full output to a string.
- A hack was at some point added (presumably due to the above issues)
  to bypass that flow at the process runner level, and instead return a
  `String` set there. That meant there were two ways of setting output
  (one of which that only worked for one of the ways of running
  processes)
  - That hack wasn't updated when the ability to return multiple mock
    processes instead of a single global mock process was added, so the
    API was even more confusing, and there was no way to set different
    output for different processes.

This changes the test APIs so that:
- `MockProcess` takes stdout and stderr as strings, and internally
  manages converting them to a `Stream<List<int>>`.
- `RecordingProcessRunner` correctly decodes and returns the output
  streams when constructing a process result.

It also removes the resultStdout and resultStderr hacks, as well as the
legacy `processToReturn` API, and converts all uses to the new
structure, which is both simpler to use, and clearly associates output
with specific processes.
2021-08-24 11:42:21 -07:00
ff8cb52f8e [flutter_plugin_tests] Split analyze out of xctest (#4161)
To prep for making a combined command to run native tests across different platforms, rework `xctest`:
- Split analyze out into a new `xcode-analyze` command:
  - Since the analyze step runs a new build over everything with different flags, this is only a small amount slower than the combined version
  - This makes the logic easier to follow
  - This allows us to meaningfully report skips, to better notice missing tests.
- Add the ability to target specific test bundles (RunnerTests or RunnerUITests)

To share code between the commands, this extracts a new `Xcode` helper class.

Part of https://github.com/flutter/flutter/issues/84392 and https://github.com/flutter/flutter/issues/86489
2021-07-20 21:17:20 -04:00