Move some et tests around and delete unused files. (flutter/engine#55764)
Just general cleanup with no behavioral changes.
This commit is contained in:
@@ -37,7 +37,7 @@ dart_test("gn_test") {
|
||||
}
|
||||
|
||||
dart_test("build_command_test") {
|
||||
main_dart = "test/build_command_test.dart"
|
||||
main_dart = "test/commands/build_command_test.dart"
|
||||
}
|
||||
|
||||
dart_test("entry_point_test") {
|
||||
@@ -45,11 +45,11 @@ dart_test("entry_point_test") {
|
||||
}
|
||||
|
||||
dart_test("fetch_command_test") {
|
||||
main_dart = "test/fetch_command_test.dart"
|
||||
main_dart = "test/commands/fetch_command_test.dart"
|
||||
}
|
||||
|
||||
dart_test("format_command_test") {
|
||||
main_dart = "test/format_command_test.dart"
|
||||
main_dart = "test/commands/format_command_test.dart"
|
||||
}
|
||||
|
||||
dart_test("label_test") {
|
||||
@@ -57,7 +57,7 @@ dart_test("label_test") {
|
||||
}
|
||||
|
||||
dart_test("lint_command_test") {
|
||||
main_dart = "test/lint_command_test.dart"
|
||||
main_dart = "test/commands/lint_command_test.dart"
|
||||
}
|
||||
|
||||
dart_test("logger_test") {
|
||||
@@ -73,11 +73,11 @@ dart_test("proc_utils_test") {
|
||||
}
|
||||
|
||||
dart_test("query_command_test") {
|
||||
main_dart = "test/query_command_test.dart"
|
||||
main_dart = "test/commands/query_command_test.dart"
|
||||
}
|
||||
|
||||
dart_test("run_command_test") {
|
||||
main_dart = "test/run_command_test.dart"
|
||||
main_dart = "test/commands/run_command_test.dart"
|
||||
}
|
||||
|
||||
dart_test("run_target_test") {
|
||||
@@ -85,7 +85,7 @@ dart_test("run_target_test") {
|
||||
}
|
||||
|
||||
dart_test("test_command_test") {
|
||||
main_dart = "test/test_command_test.dart"
|
||||
main_dart = "test/commands/test_command_test.dart"
|
||||
}
|
||||
|
||||
dart_test("typed_json_test") {
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:engine_tool/src/logger.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import 'src/test_build_configs.dart';
|
||||
import 'utils.dart';
|
||||
import 'src/utils.dart';
|
||||
|
||||
void main() {
|
||||
test('rbe defaults to true if detected', () {
|
||||
|
||||
@@ -5,16 +5,14 @@
|
||||
import 'dart:convert' as convert;
|
||||
import 'dart:ffi';
|
||||
|
||||
import 'package:engine_build_configs/engine_build_configs.dart';
|
||||
import 'package:engine_tool/src/build_utils.dart';
|
||||
import 'package:engine_tool/src/commands/command_runner.dart';
|
||||
import 'package:engine_tool/src/logger.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import 'fixtures.dart' as fixtures;
|
||||
import 'src/test_build_configs.dart';
|
||||
import 'utils.dart';
|
||||
import '../src/test_build_configs.dart';
|
||||
import '../src/utils.dart';
|
||||
|
||||
void main() {
|
||||
test('can find host runnable build', () async {
|
||||
@@ -401,20 +399,28 @@ void main() {
|
||||
|
||||
test('local config name on the command line is correctly translated',
|
||||
() async {
|
||||
final namespaceTestConfigs = BuilderConfig.fromJson(
|
||||
path: 'ci/builders/namespace_test_config.json',
|
||||
map: convert.jsonDecode(fixtures.configsToTestNamespacing)
|
||||
as Map<String, Object?>,
|
||||
final builder = TestBuilderConfig();
|
||||
builder.addBuild(
|
||||
name: 'linux/host_debug',
|
||||
dimension: TestDroneDimension.linux,
|
||||
targetDir: 'local_host_debug',
|
||||
);
|
||||
final configs = <String, BuilderConfig>{
|
||||
'namespace_test_config': namespaceTestConfigs,
|
||||
};
|
||||
builder.addBuild(
|
||||
name: 'ci/host_debug',
|
||||
dimension: TestDroneDimension.linux,
|
||||
targetDir: 'ci/host_debug',
|
||||
);
|
||||
|
||||
final testEnv = TestEnvironment.withTestEngine();
|
||||
addTearDown(testEnv.cleanup);
|
||||
|
||||
final runner = ToolCommandRunner(
|
||||
environment: testEnv.environment,
|
||||
configs: configs,
|
||||
configs: {
|
||||
'namespace_test_config': builder.buildConfig(
|
||||
path: 'ci/builders/namespace_test_config.json',
|
||||
),
|
||||
},
|
||||
);
|
||||
final result = await runner.run([
|
||||
'build',
|
||||
@@ -428,20 +434,27 @@ void main() {
|
||||
});
|
||||
|
||||
test('ci config name on the command line is correctly translated', () async {
|
||||
final namespaceTestConfigs = BuilderConfig.fromJson(
|
||||
path: 'ci/builders/namespace_test_config.json',
|
||||
map: convert.jsonDecode(fixtures.configsToTestNamespacing)
|
||||
as Map<String, Object?>,
|
||||
final builder = TestBuilderConfig();
|
||||
builder.addBuild(
|
||||
name: 'linux/host_debug',
|
||||
dimension: TestDroneDimension.linux,
|
||||
targetDir: 'local_host_debug',
|
||||
);
|
||||
builder.addBuild(
|
||||
name: 'ci/host_debug',
|
||||
dimension: TestDroneDimension.linux,
|
||||
targetDir: 'ci/host_debug',
|
||||
);
|
||||
final configs = <String, BuilderConfig>{
|
||||
'namespace_test_config': namespaceTestConfigs,
|
||||
};
|
||||
final testEnv = TestEnvironment.withTestEngine();
|
||||
addTearDown(testEnv.cleanup);
|
||||
|
||||
final runner = ToolCommandRunner(
|
||||
environment: testEnv.environment,
|
||||
configs: configs,
|
||||
configs: {
|
||||
'namespace_test_config': builder.buildConfig(
|
||||
path: 'ci/builders/namespace_test_config.json',
|
||||
),
|
||||
},
|
||||
);
|
||||
final result = await runner.run([
|
||||
'build',
|
||||
@@ -9,8 +9,8 @@ import 'package:engine_tool/src/commands/command_runner.dart';
|
||||
import 'package:logging/logging.dart' as log;
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import 'src/test_build_configs.dart';
|
||||
import 'utils.dart';
|
||||
import '../src/test_build_configs.dart';
|
||||
import '../src/utils.dart';
|
||||
|
||||
void main() {
|
||||
List<String> stringsFromLogs(List<log.LogRecord> logs) {
|
||||
@@ -5,8 +5,8 @@
|
||||
import 'package:engine_tool/src/commands/command_runner.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import 'src/test_build_configs.dart';
|
||||
import 'utils.dart';
|
||||
import '../src/test_build_configs.dart';
|
||||
import '../src/utils.dart';
|
||||
|
||||
void main() {
|
||||
test('test implicitly picks a configuration and executes tests', () async {
|
||||
@@ -11,7 +11,7 @@ import 'package:engine_tool/src/logger.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import '../src/matchers.dart';
|
||||
import '../utils.dart';
|
||||
import '../src/utils.dart';
|
||||
|
||||
void main() {
|
||||
test('devices handles a non-zero exit code', () async {
|
||||
|
||||
@@ -7,7 +7,7 @@ import 'package:engine_tool/src/label.dart';
|
||||
import 'package:engine_tool/src/logger.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import '../utils.dart';
|
||||
import '../src/utils.dart';
|
||||
|
||||
void main() {
|
||||
test('gn.desc handles a non-zero exit code', () async {
|
||||
|
||||
@@ -1,228 +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.
|
||||
|
||||
String testConfig(String osDimension, String osPlatform,
|
||||
{String suffix = ''}) =>
|
||||
'''
|
||||
{
|
||||
"builds": [
|
||||
{
|
||||
"archives": [
|
||||
{
|
||||
"name": "build_name$suffix",
|
||||
"base_path": "base/path",
|
||||
"type": "gcs",
|
||||
"include_paths": ["include/path"],
|
||||
"realm": "archive_realm"
|
||||
}
|
||||
],
|
||||
"drone_dimensions": [
|
||||
"os=$osDimension"
|
||||
],
|
||||
"gclient_variables": {
|
||||
"variable": false
|
||||
},
|
||||
"gn": ["--gn-arg", "--lto", "--no-rbe"],
|
||||
"name": "ci/build_name$suffix",
|
||||
"description": "This is a very long description that will test that the help message is wrapped correctly at an appropriate number of characters.",
|
||||
"ninja": {
|
||||
"config": "build_name$suffix",
|
||||
"targets": ["ninja_target"]
|
||||
},
|
||||
"tests": [
|
||||
{
|
||||
"language": "python3",
|
||||
"name": "build_name$suffix tests",
|
||||
"parameters": ["--test-params"],
|
||||
"script": "test/script.py",
|
||||
"contexts": ["context"]
|
||||
}
|
||||
],
|
||||
"generators": {
|
||||
"tasks": [
|
||||
{
|
||||
"name": "generator_task",
|
||||
"language": "python",
|
||||
"parameters": ["--gen-param"],
|
||||
"scripts": ["gen/script.py"]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{},
|
||||
{},
|
||||
{
|
||||
"drone_dimensions": [
|
||||
"os=$osDimension"
|
||||
],
|
||||
"gn": ["--gn-arg", "--lto", "--no-rbe"],
|
||||
"name": "$osPlatform/host_debug$suffix",
|
||||
"ninja": {
|
||||
"config": "host_debug$suffix",
|
||||
"targets": ["ninja_target"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"drone_dimensions": [
|
||||
"os=$osDimension"
|
||||
],
|
||||
"gn": ["--gn-arg", "--lto", "--no-rbe"],
|
||||
"name": "$osPlatform/android_debug${suffix}_arm64",
|
||||
"ninja": {
|
||||
"config": "android_debug${suffix}_arm64",
|
||||
"targets": ["ninja_target"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"drone_dimensions": [
|
||||
"os=$osDimension"
|
||||
],
|
||||
"gn": ["--gn-arg", "--lto", "--rbe"],
|
||||
"name": "ci/android_debug${suffix}_rbe_arm64",
|
||||
"ninja": {
|
||||
"config": "android_debug${suffix}_rbe_arm64",
|
||||
"targets": ["ninja_target"]
|
||||
}
|
||||
}
|
||||
],
|
||||
"generators": {
|
||||
"tasks": [
|
||||
{
|
||||
"name": "global generator task",
|
||||
"parameters": ["--global-gen-param"],
|
||||
"script": "global/gen_script.dart",
|
||||
"language": "dart"
|
||||
}
|
||||
]
|
||||
},
|
||||
"tests": [
|
||||
{
|
||||
"name": "global test",
|
||||
"recipe": "engine_v2/tester_engine",
|
||||
"drone_dimensions": [
|
||||
"os=$osDimension"
|
||||
],
|
||||
"gclient_variables": {
|
||||
"variable": false
|
||||
},
|
||||
"dependencies": ["dependency"],
|
||||
"test_dependencies": [
|
||||
{
|
||||
"dependency": "test_dependency",
|
||||
"version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603"
|
||||
}
|
||||
],
|
||||
"tasks": [
|
||||
{
|
||||
"name": "global test task",
|
||||
"parameters": ["--test-parameter"],
|
||||
"script": "global/test/script.py"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
''';
|
||||
|
||||
const String configsToTestNamespacing = '''
|
||||
{
|
||||
"builds": [
|
||||
{
|
||||
"drone_dimensions": [
|
||||
"os=Linux"
|
||||
],
|
||||
"gn": ["--gn-arg", "--lto", "--no-rbe"],
|
||||
"name": "linux/host_debug",
|
||||
"ninja": {
|
||||
"config": "local_host_debug",
|
||||
"targets": ["ninja_target"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"drone_dimensions": [
|
||||
"os=Linux"
|
||||
],
|
||||
"gn": ["--gn-arg", "--lto", "--no-rbe"],
|
||||
"name": "ci/host_debug",
|
||||
"ninja": {
|
||||
"config": "ci/host_debug",
|
||||
"targets": ["ninja_target"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
''';
|
||||
|
||||
String attachedDevices() => '''
|
||||
[
|
||||
{
|
||||
"name": "sdk gphone64 arm64",
|
||||
"id": "emulator-5554",
|
||||
"isSupported": true,
|
||||
"targetPlatform": "android-arm64",
|
||||
"emulator": true,
|
||||
"sdk": "Android 14 (API 34)",
|
||||
"capabilities": {
|
||||
"hotReload": true,
|
||||
"hotRestart": true,
|
||||
"screenshot": true,
|
||||
"fastStart": true,
|
||||
"flutterExit": true,
|
||||
"hardwareRendering": true,
|
||||
"startPaused": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "macOS",
|
||||
"id": "macos",
|
||||
"isSupported": true,
|
||||
"targetPlatform": "darwin",
|
||||
"emulator": false,
|
||||
"sdk": "macOS 14.3.1 23D60 darwin-arm64",
|
||||
"capabilities": {
|
||||
"hotReload": true,
|
||||
"hotRestart": true,
|
||||
"screenshot": false,
|
||||
"fastStart": false,
|
||||
"flutterExit": true,
|
||||
"hardwareRendering": false,
|
||||
"startPaused": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Mac Designed for iPad",
|
||||
"id": "mac-designed-for-ipad",
|
||||
"isSupported": true,
|
||||
"targetPlatform": "darwin",
|
||||
"emulator": false,
|
||||
"sdk": "macOS 14.3.1 23D60 darwin-arm64",
|
||||
"capabilities": {
|
||||
"hotReload": true,
|
||||
"hotRestart": true,
|
||||
"screenshot": false,
|
||||
"fastStart": false,
|
||||
"flutterExit": true,
|
||||
"hardwareRendering": false,
|
||||
"startPaused": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Chrome",
|
||||
"id": "chrome",
|
||||
"isSupported": true,
|
||||
"targetPlatform": "web-javascript",
|
||||
"emulator": false,
|
||||
"sdk": "Google Chrome 122.0.6261.94",
|
||||
"capabilities": {
|
||||
"hotReload": true,
|
||||
"hotRestart": true,
|
||||
"screenshot": false,
|
||||
"fastStart": false,
|
||||
"flutterExit": false,
|
||||
"hardwareRendering": false,
|
||||
"startPaused": true
|
||||
}
|
||||
}
|
||||
]
|
||||
''';
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import 'utils.dart';
|
||||
import 'src/utils.dart';
|
||||
|
||||
void main() async {
|
||||
final cannedProcesses = <CannedProcess>[
|
||||
|
||||
Reference in New Issue
Block a user