mirror of
https://github.com/flutter/packages.git
synced 2025-07-03 17:18:22 +08:00
[ci] Bring up LUCI Linux custom package tests (#4382)
Adds LUCI version of Linux custom package tests. Removes the custom tests for `cross_file` and `google_identity_services_web` since they only existed to run unit tests in browser mode, which is [now standard for all packages that can be run that way](https://github.com/flutter/packages/pull/4378). Part of https://github.com/flutter/flutter/issues/114373
This commit is contained in:
34
.ci.yaml
34
.ci.yaml
@ -214,6 +214,40 @@ targets:
|
|||||||
channel: stable
|
channel: stable
|
||||||
version_file: flutter_stable.version
|
version_file: flutter_stable.version
|
||||||
|
|
||||||
|
- name: Linux_android custom_package_tests master
|
||||||
|
bringup: true # New target
|
||||||
|
recipe: packages/packages
|
||||||
|
timeout: 30
|
||||||
|
properties:
|
||||||
|
add_recipes_cq: "true"
|
||||||
|
version_file: flutter_master.version
|
||||||
|
target_file: linux_custom_package_tests.yaml
|
||||||
|
cores: "32"
|
||||||
|
# Pigeon tests need Andoid deps (thus the Linux_android base) and
|
||||||
|
# clang-format.
|
||||||
|
dependencies: >-
|
||||||
|
[
|
||||||
|
{"dependency": "clang", "version": "git_revision:5d5aba78dbbee75508f01bcaa69aedb2ab79065a"}
|
||||||
|
]
|
||||||
|
channel: master
|
||||||
|
|
||||||
|
- name: Linux_android custom_package_tests stable
|
||||||
|
bringup: true # New target
|
||||||
|
recipe: packages/packages
|
||||||
|
timeout: 30
|
||||||
|
properties:
|
||||||
|
add_recipes_cq: "true"
|
||||||
|
version_file: flutter_stable.version
|
||||||
|
target_file: linux_custom_package_tests.yaml
|
||||||
|
cores: "32"
|
||||||
|
# Pigeon tests need Android deps (thus the Linux_android base) and
|
||||||
|
# clang-format.
|
||||||
|
dependencies: >-
|
||||||
|
[
|
||||||
|
{"dependency": "clang", "version": "git_revision:5d5aba78dbbee75508f01bcaa69aedb2ab79065a"}
|
||||||
|
]
|
||||||
|
channel: stable
|
||||||
|
|
||||||
### Android tasks ###
|
### Android tasks ###
|
||||||
- name: Linux_android android_build_all_packages master
|
- name: Linux_android android_build_all_packages master
|
||||||
recipe: packages/packages
|
recipe: packages/packages
|
||||||
|
@ -4,11 +4,5 @@
|
|||||||
# found in the LICENSE file.
|
# found in the LICENSE file.
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Exclusions
|
|
||||||
#
|
|
||||||
# script/configs/linux_only_custom_test.yaml
|
|
||||||
# Custom tests need Chrome. (They run in linux-custom_package_tests)
|
|
||||||
|
|
||||||
dart ./script/tool/bin/flutter_plugin_tools.dart custom-test \
|
dart ./script/tool/bin/flutter_plugin_tools.dart custom-test \
|
||||||
--packages-for-branch --log-timing \
|
--packages-for-branch --log-timing
|
||||||
--exclude=script/configs/linux_only_custom_test.yaml
|
|
||||||
|
6
.ci/targets/linux_custom_package_tests.yaml
Normal file
6
.ci/targets/linux_custom_package_tests.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
tasks:
|
||||||
|
- name: prepare tool
|
||||||
|
script: .ci/scripts/prepare_tool.sh
|
||||||
|
- name: custom tests
|
||||||
|
script: script/tool_runner.sh
|
||||||
|
args: ["custom-test"]
|
@ -1,50 +0,0 @@
|
|||||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style license that can be
|
|
||||||
// found in the LICENSE file.
|
|
||||||
|
|
||||||
// Runs `dart test -p chrome` in the root of the cross_file package.
|
|
||||||
//
|
|
||||||
// Called from the custom-tests CI action.
|
|
||||||
//
|
|
||||||
// usage: dart run tool/run_tests.dart
|
|
||||||
// (needs a `chrome` executable in $PATH, or a tweak to dart_test.yaml)
|
|
||||||
import 'dart:async';
|
|
||||||
import 'dart:io';
|
|
||||||
import 'package:path/path.dart' as p;
|
|
||||||
|
|
||||||
Future<void> main(List<String> args) async {
|
|
||||||
final Directory workingDir =
|
|
||||||
Directory(p.dirname(Platform.script.path)).parent;
|
|
||||||
|
|
||||||
final int status = await _runProcess(
|
|
||||||
'dart',
|
|
||||||
<String>[
|
|
||||||
'test',
|
|
||||||
'-p',
|
|
||||||
'chrome',
|
|
||||||
],
|
|
||||||
workingDirectory: workingDir.path,
|
|
||||||
);
|
|
||||||
|
|
||||||
exit(status);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<Process> _streamOutput(Future<Process> processFuture) async {
|
|
||||||
final Process process = await processFuture;
|
|
||||||
unawaited(stdout.addStream(process.stdout));
|
|
||||||
unawaited(stderr.addStream(process.stderr));
|
|
||||||
return process;
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<int> _runProcess(
|
|
||||||
String command,
|
|
||||||
List<String> arguments, {
|
|
||||||
String? workingDirectory,
|
|
||||||
}) async {
|
|
||||||
final Process process = await _streamOutput(Process.start(
|
|
||||||
command,
|
|
||||||
arguments,
|
|
||||||
workingDirectory: workingDirectory,
|
|
||||||
));
|
|
||||||
return process.exitCode;
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style license that can be
|
|
||||||
// found in the LICENSE file.
|
|
||||||
|
|
||||||
// Runs `dart test -p chrome` in the root of the google_identity_services_web package.
|
|
||||||
//
|
|
||||||
// Called from the custom-tests CI action.
|
|
||||||
//
|
|
||||||
// usage: dart run tool/run_tests.dart
|
|
||||||
// (needs a `chrome` executable in $PATH, or a tweak to dart_test.yaml)
|
|
||||||
import 'dart:async';
|
|
||||||
import 'dart:io';
|
|
||||||
import 'package:path/path.dart' as p;
|
|
||||||
|
|
||||||
Future<void> main(List<String> args) async {
|
|
||||||
final Directory workingDir =
|
|
||||||
Directory(p.dirname(Platform.script.path)).parent;
|
|
||||||
|
|
||||||
final int status = await _runProcess(
|
|
||||||
'dart',
|
|
||||||
<String>[
|
|
||||||
'test',
|
|
||||||
'-p',
|
|
||||||
'chrome',
|
|
||||||
],
|
|
||||||
workingDirectory: workingDir.path,
|
|
||||||
);
|
|
||||||
|
|
||||||
exit(status);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<Process> _streamOutput(Future<Process> processFuture) async {
|
|
||||||
final Process process = await processFuture;
|
|
||||||
unawaited(stdout.addStream(process.stdout));
|
|
||||||
unawaited(stderr.addStream(process.stderr));
|
|
||||||
return process;
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<int> _runProcess(
|
|
||||||
String command,
|
|
||||||
List<String> arguments, {
|
|
||||||
String? workingDirectory,
|
|
||||||
}) async {
|
|
||||||
final Process process = await _streamOutput(Process.start(
|
|
||||||
command,
|
|
||||||
arguments,
|
|
||||||
workingDirectory: workingDirectory,
|
|
||||||
));
|
|
||||||
return process.exitCode;
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
# Packages that only support `custom-test` in linux, because that's
|
|
||||||
# the only place where we install Chrome.
|
|
||||||
#
|
|
||||||
# This file is used to "--exclude" these packages from the relevant
|
|
||||||
# mac/windows CI test runs.
|
|
||||||
|
|
||||||
- cross_file
|
|
||||||
- google_identity_services_web
|
|
||||||
|
|
Reference in New Issue
Block a user