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

Move some et tests around and delete unused files. #55764

Merged
merged 3 commits into from
Oct 9, 2024
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
14 changes: 7 additions & 7 deletions tools/engine_tool/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,27 @@ 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") {
main_dart = "test/entry_point_test.dart"
}

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") {
main_dart = "test/label_test.dart"
}

dart_test("lint_command_test") {
main_dart = "test/lint_command_test.dart"
main_dart = "test/commands/lint_command_test.dart"
}

dart_test("logger_test") {
Expand All @@ -73,19 +73,19 @@ 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") {
main_dart = "test/run_target_test.dart"
}

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") {
Expand Down
2 changes: 1 addition & 1 deletion tools/engine_tool/test/build_plan_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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', () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion tools/engine_tool/test/external_tools/gn_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading