From 1924d2349b10d56749787140bf04fe1c818d07f3 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Thu, 11 May 2023 10:26:47 -0400 Subject: [PATCH 1/2] [ci] Add LUCI repo tool tests - Adds a LUCI version of the Linux repo tools test, as a first test of a Linux repository test being migrated to LUCI. - Fixes the Windows repo tools test to actually run a test, which it wasn't due to a mistaken duplicate yaml file, only one of which was correct (the one that wasn't being used). --- .ci.yaml | 13 ++++++++++++- .ci/targets/plugin_tools_tests.yaml | 5 ----- .ci/targets/repo_tools_tests.yaml | 3 ++- 3 files changed, 14 insertions(+), 7 deletions(-) delete mode 100644 .ci/targets/plugin_tools_tests.yaml diff --git a/.ci.yaml b/.ci.yaml index c2eff7485998..5b68ab257597 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -44,7 +44,18 @@ platform_properties: xcode: 14e222b targets: - ### iOS+macOS tasks *** + ### Linux tasks ### + - name: Linux repo_tools_tests + 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. diff --git a/.ci/targets/plugin_tools_tests.yaml b/.ci/targets/plugin_tools_tests.yaml deleted file mode 100644 index 265e74bdd06b..000000000000 --- a/.ci/targets/plugin_tools_tests.yaml +++ /dev/null @@ -1,5 +0,0 @@ -tasks: - - name: prepare tool - script: .ci/scripts/prepare_tool.sh - - name: tool unit tests - script: .ci/scripts/plugin_tools_tests.sh diff --git a/.ci/targets/repo_tools_tests.yaml b/.ci/targets/repo_tools_tests.yaml index a73053e34524..265e74bdd06b 100644 --- a/.ci/targets/repo_tools_tests.yaml +++ b/.ci/targets/repo_tools_tests.yaml @@ -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 From 3a6e7311883dc6e2d2233be9eaec01643840165f Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Thu, 11 May 2023 10:48:31 -0400 Subject: [PATCH 2/2] Add missing mock platform to fix Windows --- script/tool/test/publish_check_command_test.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/script/tool/test/publish_check_command_test.dart b/script/tool/test/publish_check_command_test.dart index f2120040fc6d..b85e56064c9c 100644 --- a/script/tool/test/publish_check_command_test.dart +++ b/script/tool/test/publish_check_command_test.dart @@ -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(MockProcess(exitCode: 1, stdout: 'Some error from pub'), @@ -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 output = await runCapturingPrint(runner, ['publish-check']);