Commit Graph

30 Commits

Author SHA1 Message Date
Matan Lurey
71d50a1616
Start using bin/cache/engine.{stamp|realm} instead of bin/internal/engine.{realm|version}. (#164352)
Towards https://github.com/flutter/flutter/issues/164315.

See also:
https://github.com/flutter/flutter/blob/master/docs/tool/Engine-artifacts.md.

There are more usages in `flutter/flutter`, but some will require more
specialized review (i.e. from release folks, or the Dart SDK team), so
I'll split those off.

~~Requires https://github.com/flutter/flutter/pull/164317 to merge
first.~~ 
2025-03-02 00:54:33 +00:00
Matan Lurey
99fe90a05e
Remove CIRRUS_TASK_NAME from what I can tell, is always omitted on LUCI (#161391)
Towards https://github.com/flutter/flutter/issues/161387.

Example build, no `CIRRUS_TASK_NAME`:

<https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8726279068923920961/+/u/OS_info/l_execution_details>
2025-01-10 03:05:34 +00:00
Matan Lurey
9bed9d7f95
Replace the always omitted CPU environment variable with numberOfProcessors. (#161392)
I am not sure if this is a 1:1 comparison, so please advise.

Towards https://github.com/flutter/flutter/issues/161387.
2025-01-10 02:41:05 +00:00
LongCatIsLooong
b15625ca92
Turn deprecation message analyze tests back on (#160554)
Additionally:
- Deprecation message analyzer: use AST more instead of regex 
- Deprecation message analyzer: removes some tests since they are in the
formatter's jurisdiction now
- update the analyzer test fixture to fix a couple line numbers
- `@_debugOnly` set `multiline` back to false. The source we get back
from the `ASTNode` doesn't have any line feed characters.

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] 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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2024-12-27 23:26:24 +00:00
Michael Goderbauer
5491c8c146
Auto-format Framework (#160545)
This auto-formats all *.dart files in the repository outside of the
`engine` subdirectory and enforces that these files stay formatted with
a presubmit check.

**Reviewers:** Please carefully review all the commits except for the
one titled "formatted". The "formatted" commit was auto-generated by
running `dev/tools/format.sh -a -f`. The other commits were hand-crafted
to prepare the repo for the formatting change. I recommend reviewing the
commits one-by-one via the "Commits" tab and avoiding Github's "Files
changed" tab as it will likely slow down your browser because of the
size of this PR.

---------

Co-authored-by: Kate Lovett <katelovett@google.com>
Co-authored-by: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com>
2024-12-19 20:06:21 +00:00
Anis Alibegić
e2ada1c939
Fixed typos (#159331)
Here's another one of my PRs where I hunt for typos across `flutter`
repo.

## 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].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] 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.

<!-- 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
2024-12-05 16:54:09 +00:00
Matan Lurey
bf36437cae
Add --dry-run to dev/bots/test.dart. (#158956)
Closes https://github.com/flutter/flutter/issues/158884.

/cc @reidbaker.

Example output:

```sh
% SHARD=tool_integration_tests SUBSHARD=6_6 dart dev/bots/test.dart --dry-run 
▌13:59:18▐ STARTING ANALYSIS
▌13:59:18▐ --dry-run enabled. Tests will not actually be executed.
▌13:59:18▐ SHARD=tool_integration_tests
▌13:59:18▐ SUBSHARD=6_6
▌13:59:18▐ |> bin/flutter: 
  --version
▌13:59:18▐ |> bin/cache/dart-sdk/bin/dart (packages/flutter_tools): 
  run
  test
  --reporter=expanded
  --file-reporter=json:/var/folders/qw/qw_3qd1x4kz5w975jhdq4k58007b7h/T/metrics_1731621558619861.json
  --test-randomize-ordering-seed=20241114
  -j1
  test/integration.shard/shader_compiler_test.dart
  test/integration.shard/overall_experience_test.dart
  test/integration.shard/expression_evaluation_test.dart
  test/integration.shard/isolated/native_assets_without_cbuild_assemble_test.dart
  test/integration.shard/isolated/native_assets_test.dart
  test/integration.shard/isolated/native_assets_agp_version_test.dart
  test/integration.shard/coverage_collection_test.dart
  test/integration.shard/devtools_uri_test.dart
  test/integration.shard/deprecated_gradle_settings_test.dart
  test/integration.shard/batch_entrypoint_test.dart
  test/integration.shard/bash_entrypoint_test.dart
  test/integration.shard/background_isolate_test.dart
```
2024-11-20 21:01:54 +00:00
Matan Lurey
ec2ab541dd
Switch flutter_build_apk_health_tests to use a subset of current tests. (#159004)
Towards https://github.com/flutter/flutter/issues/159000 as part of
debugging issues such as
https://github.com/flutter/flutter/issues/158560.

On a `bringup: true` shard, run a number of `flutter build apk` tests in
succession to try and routinely trigger timeouts and crashes, so we can
test other hypotheses on how to fix this problem (i.e. potentially
around increasing memory, changing daemon configuration, aggressively
killing processes, etc).
2024-11-15 22:54:06 +00:00
auto-submit[bot]
32133ce7ac
Reverts "Try running historically flaky tests first to make flutter build apk health tests time out more often? (#158967)" (#158993)
Reverts: flutter/flutter#158967
Initiated by: matanlurey
Reason for reverting: `--run-skipped` doesn't work in this repository (https://github.com/flutter/flutter/issues/158972).
Original PR Author: matanlurey

Reviewed By: {andrewkolos}

This change reverts the following previous change:
I have no idea if this will work, but `6_6` is currently the suite that seems to have the most problems.

Towards https://github.com/flutter/flutter/issues/158560.
2024-11-15 19:05:47 +00:00
Matan Lurey
57b0b02e4d
Try running historically flaky tests first to make flutter build apk health tests time out more often? (#158967)
I have no idea if this will work, but `6_6` is currently the suite that seems to have the most problems.

Towards https://github.com/flutter/flutter/issues/158560.
2024-11-15 00:45:50 +00:00
Matan Lurey
f2e907acdd
Use discenrable characters (replace ' 🙙 🙛 ' in error logs) (#157548)
Fixes an annoyance of mine where I stare at two boxes in the logs and have to guess if they are part of the real output:

<img width="795" alt="Screenshot 2024-10-24 at 12 47 58 PM" src="https://github.com/user-attachments/assets/a986f71c-5533-4899-aeb8-126dc82794fb">

Related to https://github.com/flutter/flutter/issues/157542#issuecomment-2436083676.
2024-10-24 22:05:52 +00:00
Andrew Kolos
eccf4ee226
fix test sharding (#156768)
Also cleans up https://github.com/flutter/flutter/issues/156762

<details>

<summary> Pre-launch checklist </summary> 

</details>
2024-10-23 19:36:09 +00:00
Kate Lovett
62586dc09d
Update old wiki links (#149544)
Part of https://github.com/flutter/flutter/issues/145009

Finishes updating links in the repo that pointed to the old wiki
2024-06-17 17:26:08 +00:00
Jesse
9689f7f89c
Refactor framework + test harness tests (#146213)
Refactor the framework + test harness test suites in order to reduce testing logic in test.dart and allow for later implementing package:test onto the existing tests

The refactor of both suites included in this PR because they both depended on util functions and variables that also needed to be refactored.

Part of https://github.com/flutter/flutter/issues/145482
2024-04-23 19:29:04 +00:00
Jesse
f0fc419a6c
Refactor framework coverage tests (#146210)
Refactor framework coverage tests in order to reduce testing logic in test.dart and allow for later implementing package:test onto the existing framework coverage tests

Part of https://github.com/flutter/flutter/issues/145482
2024-04-18 21:07:05 +00:00
Jesse
e660a93c63
Create web tests suite & runner_utils (#146592)
Move from `test.dart` into new `runner_utils.dart` file:
- shard calculation related methods + `shuffleSeed` logic
- env variable flag calculation
- runner wrapper methods `runDartTest` and `_runFromList`

Create web tests suite class containing:
- web long running tests
- runWebHtmlUnitTests
- runWebCanvasKitUnitTests
- runWebSkwasmUnitTests
- the associate helper methods with the above
2024-04-17 20:44:08 +00:00
Christopher Fujino
2dd06d10c9
[flutter_tools] add custom tool analysis to analyze.dart, lint Future.catchError (#140122)
Ensure tool code does not use Future.catchError or Future.onError, because it is not statically safe: https://github.com/dart-lang/sdk/issues/51248.

This was proposed upstream in dart-lang/linter in https://github.com/dart-lang/linter/issues/4071 and https://github.com/dart-lang/linter/pull/4068, but not accepted.
2024-03-07 18:10:07 +00:00
Ian Hickson
11119cff38
More helpful test.dart output (#140175)
Each error section is numbered, so you can all be sure you're talking about the same one.
A message is printed at the very end telling you how to find the error blocks in the verbose logs.
2023-12-28 23:16:12 +00:00
LongCatIsLooong
aa609127e7
Use dart analyze package for num.clamp (#139867)
Extacted from #130101, dropped the `@_debugAssert` stuff from that PR so it's easier to review.
2023-12-11 20:25:26 +00:00
godofredoc
50f7910e80
Do not use colors in output if running from CI. (#122645)
Do not use colors in output if running from CI.
2023-04-04 18:41:47 +00:00
Greg Price
98b3e48ed4
Fix hang on successful dev/bots/analyze.dart (#117660)
Fixes #117659

It turns out this was due to the output-suppression timer introduced
recently as part of cleaning up the output (#109206); on success, the
script would wait 10 minutes for the timeout to expire.  This didn't
affect CI because this feature doesn't apply in CI (as detected by
lack of color on stdout.)

Fix the issue by cleaning up the timer on success in the same way
as on failure.

While here, clean up the final summary messages slightly,
and also cut the trailing space that printProgress was leaving
on each line.
2023-02-08 00:04:23 +00:00
Ian Hickson
4c99da6c56
Avoid printing blank lines between "Another exception was thrown:" messages. (#119587) 2023-02-01 23:57:54 +00:00
Ian Hickson
97901da149
Cleaner test.dart output. (#109206) 2022-08-14 08:53:54 +00:00
Ian Hickson
03aa059c3c
Do not abort at first error when tests fail. (#108936) 2022-08-05 16:18:54 -07:00
Michael Goderbauer
10a7c9ba22
Unify analysis options (#108462) 2022-07-28 09:07:49 -07:00
Yegor
0420d56335
consolidate all web integration tests under the same shard (#82307)
* consolidate all web integration tests under the same shard
2021-05-12 15:01:11 -07:00
Dan Field
22239f4183
Test engine version hash, but skip for Dart HHH bot (#55223) 2020-05-04 11:19:02 -07: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