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

[ci] Add LUCI repo tool tests #3964

Merged
merged 2 commits into from
May 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,18 @@ platform_properties:
xcode: 14e222b

targets:
### iOS+macOS tasks ***
### Linux tasks ###
- name: Linux repo_tools_tests
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this test need the docker image support?
/cc @yusuf-goog who is helping with general docker support for vm based builds.

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 would not expect it to.

Per this comment, I'm not convinced we need docker support at all for this repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(This test is literally just running dart test in a directory, so if we need Docker for this something is wrong.)

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice. Then the Linux migration should be unblocked! /cc @yusuf-goog who is also helping with remaining packages Linux tasks migration to LUCI.

One thing to check is whether this test needs any dependencies. Now the linux platform only enforces the os dimension os: Linux. An LED run may give you some signal. This is the doc how to test a new builder: go/flutter-luci-recipes#testing-a-local-change-for-a-new-builderrecipe. For this case specifically, you can use Windows repo_tools_tests, and change the os to Linux.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

bringup: true # New target
recipe: packages/packages
timeout: 30
properties:
add_recipes_cq: "true"
target_file: repo_tools_tests.yaml
channel: master
version_file: flutter_master.version

### iOS+macOS tasks ###
# TODO(stuartmorgan): Move this to ARM once google_maps_flutter has ARM
# support. `pod lint` makes a synthetic target that doesn't respect the
# pod's arch exclusions, so fails to build.
Expand Down
5 changes: 0 additions & 5 deletions .ci/targets/plugin_tools_tests.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion .ci/targets/repo_tools_tests.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
# TODO(stuartmorgan): Add actual tests here when moving the repo tooling.
- name: tool unit tests
script: .ci/scripts/plugin_tools_tests.sh
8 changes: 6 additions & 2 deletions script/tool/test/publish_check_command_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,9 @@ void main() {
'Test for publish-check command.',
);
runner.addCommand(PublishCheckCommand(packagesDir,
processRunner: processRunner, httpClient: mockClient));
platform: mockPlatform,
processRunner: processRunner,
httpClient: mockClient));

processRunner.mockProcessesForExecutable['flutter'] = <FakeProcessInfo>[
FakeProcessInfo(MockProcess(exitCode: 1, stdout: 'Some error from pub'),
Expand Down Expand Up @@ -339,7 +341,9 @@ void main() {
'Test for publish-check command.',
);
runner.addCommand(PublishCheckCommand(packagesDir,
processRunner: processRunner, httpClient: mockClient));
platform: mockPlatform,
processRunner: processRunner,
httpClient: mockClient));

final List<String> output =
await runCapturingPrint(runner, <String>['publish-check']);
Expand Down