Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add et query tests and et test commands #51605

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

johnmccutchan
Copy link
Contributor

  • et query tests enumerates all test binaries encoded in BUILD.gn files.
  • et test builds, then, runs a set of tests in parallel
  • Tests

///
/// We support:
/// 1) Exact label matches (the '//' prefix will be stripped off).
/// 2) '/...' suffix which selects all targets that match the prefix.
Copy link
Member

@loic-sharma loic-sharma Mar 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running Windows tests with this syntax is a bit verbose:

et test flutter/shell/platform/windows/...

Some potential solutions:

  1. We support executable names as selectors. Windows tests become et test flutter_windows_unittests.
  2. We support glob patterns. Windows tests become et test **/windows/..., running all tests becomes et test **/...
  3. We flatten the engine repo. Windows tests becomes et test flutter/windows/...

Thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What Bazel supports is being in a sub-directory, in other words:

cd shell/platform/windows
et test :flutter_windows_unittests

I'd be supportive of supporting that in et (assuming GN is OK with it or it's easy to implement). I don't think we should create any other cute/creative short-hands.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just press "up" (or ctrl+R) in my terminal when I'm developing so I don't totally get the point that it's a lot to type.

I agree we should support the sub-directory workflow that Matan mentioned.

Also, if we get into a situation where we have to specify a bunch of subdirectories (et build/test subA/... subB/...) the fix might be reorganize the directory tree so that related code is near each other.

tools/engine_tool/lib/src/commands/test_command.dart Outdated Show resolved Hide resolved
tools/engine_tool/lib/src/commands/test_command.dart Outdated Show resolved Hide resolved
tools/engine_tool/lib/src/gn_utils.dart Outdated Show resolved Hide resolved
}
// Drop the empty line at the end of the output.
if (labels.isNotEmpty) {
assert(labels.last.isEmpty);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: Neither the et wrapper script nor the unit tests run with --enable-asserts. Do you want to add the flag to the unit tests in this PR?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also be supportive of just making this an unconditional throw, since it's going to throw anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we never run with --enable-asserts can we add a lint that will flag assert calls for us, or, start running with asserts enabled?

Also, made this a throw.

tools/engine_tool/test/test_command_test.dart Outdated Show resolved Hide resolved
tools/engine_tool/test/utils.dart Show resolved Hide resolved
@loic-sharma
Copy link
Member

This is looking awesome, excellent work!

@johnmccutchan johnmccutchan force-pushed the et_test branch 4 times, most recently from ee91046 to a1e3b83 Compare March 28, 2024 19:36
Copy link
Member

@zanderso zanderso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

tools/engine_tool/lib/src/commands/query_command.dart Outdated Show resolved Hide resolved
- `et query tests` enumerates all test binaries encoded in BUILD.gn files.
- `et test` (builds, then) runs a set of tests in parallel
- Tests
@johnmccutchan johnmccutchan added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 28, 2024
@johnmccutchan johnmccutchan merged commit b5c00a3 into flutter:main Mar 28, 2024
24 of 26 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 29, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Mar 29, 2024
…145946)

flutter/engine@8b893cb...68aa9ba

2024-03-28 [email protected] [Impeller] dont clamp mipmap level to 0 with Vulkan textures. (flutter/engine#51761)
2024-03-28 [email protected] Add `et query tests` and `et test` commands (flutter/engine#51605)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants