mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Remove all use of gn desc global test fixtures. (flutter/engine#55592)
Closes https://github.com/flutter/flutter/issues/148420.
This commit is contained in:
parent
9aa654a001
commit
7a1d324299
@ -1,6 +1,5 @@
|
||||
import 'package:meta/meta.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
import 'package:process_runner/process_runner.dart';
|
||||
|
||||
import 'environment.dart';
|
||||
import 'label.dart';
|
||||
@ -19,13 +18,15 @@ interface class Gn {
|
||||
|
||||
final Environment _environment;
|
||||
|
||||
String get _gnPath => p.join(
|
||||
_environment.engine.srcDir.path,
|
||||
'flutter',
|
||||
'third_party',
|
||||
'gn',
|
||||
_environment.platform.isWindows ? 'gn.exe' : 'gn',
|
||||
);
|
||||
String get _gnPath {
|
||||
return p.join(
|
||||
_environment.engine.srcDir.path,
|
||||
'flutter',
|
||||
'third_party',
|
||||
'gn',
|
||||
_environment.platform.isWindows ? 'gn.exe' : 'gn',
|
||||
);
|
||||
}
|
||||
|
||||
/// Returns a list of build targets that match the given [pattern].
|
||||
///
|
||||
@ -41,15 +42,14 @@ interface class Gn {
|
||||
String outDir,
|
||||
TargetPattern pattern,
|
||||
) async {
|
||||
final List<String> command = <String>[
|
||||
final command = [
|
||||
_gnPath,
|
||||
'desc',
|
||||
'--format=json',
|
||||
outDir,
|
||||
pattern.toGnPattern(),
|
||||
];
|
||||
final ProcessRunnerResult process =
|
||||
await _environment.processRunner.runProcess(
|
||||
final process = await _environment.processRunner.runProcess(
|
||||
command,
|
||||
workingDirectory: _environment.engine.srcDir,
|
||||
failOk: true,
|
||||
@ -72,7 +72,7 @@ interface class Gn {
|
||||
'No targets matched the pattern `${pattern.toGnPattern()}`',
|
||||
);
|
||||
}
|
||||
return <BuildTarget>[];
|
||||
return [];
|
||||
}
|
||||
|
||||
_environment.logger.fatal(
|
||||
@ -95,13 +95,13 @@ interface class Gn {
|
||||
return result
|
||||
.asMap()
|
||||
.entries
|
||||
.map((MapEntry<String, Object?> entry) {
|
||||
final String label = entry.key;
|
||||
final Object? properties = entry.value;
|
||||
.map((entry) {
|
||||
final label = entry.key;
|
||||
final properties = entry.value;
|
||||
if (properties is! Map<String, Object?>) {
|
||||
return null;
|
||||
}
|
||||
final BuildTarget? target = BuildTarget._fromJson(
|
||||
final target = BuildTarget._fromJson(
|
||||
label,
|
||||
JsonObject(properties),
|
||||
);
|
||||
@ -130,7 +130,7 @@ sealed class BuildTarget {
|
||||
final (
|
||||
String type,
|
||||
bool testOnly,
|
||||
) = json.map((JsonObject json) => (
|
||||
) = json.map((json) => (
|
||||
json.string('type'),
|
||||
json.boolean('testonly'),
|
||||
));
|
||||
|
||||
@ -17,17 +17,9 @@ import 'src/test_build_configs.dart';
|
||||
import 'utils.dart';
|
||||
|
||||
void main() {
|
||||
final cannedProcesses = [
|
||||
CannedProcess(
|
||||
(command) => command.contains('desc'),
|
||||
stdout: fixtures.gnDescOutput(),
|
||||
),
|
||||
];
|
||||
|
||||
test('can find host runnable build', () async {
|
||||
final testEnv = TestEnvironment.withTestEngine(
|
||||
abi: Abi.macosArm64,
|
||||
cannedProcesses: cannedProcesses,
|
||||
);
|
||||
addTearDown(testEnv.cleanup);
|
||||
|
||||
@ -61,7 +53,6 @@ void main() {
|
||||
test('build command invokes gn', () async {
|
||||
final testEnv = TestEnvironment.withTestEngine(
|
||||
abi: Abi.macosArm64,
|
||||
cannedProcesses: cannedProcesses,
|
||||
);
|
||||
addTearDown(testEnv.cleanup);
|
||||
|
||||
@ -96,7 +87,6 @@ void main() {
|
||||
test('build command invokes ninja', () async {
|
||||
final testEnv = TestEnvironment.withTestEngine(
|
||||
abi: Abi.macosArm64,
|
||||
cannedProcesses: cannedProcesses,
|
||||
);
|
||||
addTearDown(testEnv.cleanup);
|
||||
|
||||
@ -130,7 +120,6 @@ void main() {
|
||||
test('build command invokes generator', () async {
|
||||
final testEnv = TestEnvironment.withTestEngine(
|
||||
abi: Abi.macosArm64,
|
||||
cannedProcesses: cannedProcesses,
|
||||
);
|
||||
addTearDown(testEnv.cleanup);
|
||||
|
||||
@ -167,7 +156,6 @@ void main() {
|
||||
test('build command does not invoke tests', () async {
|
||||
final testEnv = TestEnvironment.withTestEngine(
|
||||
abi: Abi.macosArm64,
|
||||
cannedProcesses: cannedProcesses,
|
||||
);
|
||||
addTearDown(testEnv.cleanup);
|
||||
|
||||
@ -205,7 +193,6 @@ void main() {
|
||||
final testEnv = TestEnvironment.withTestEngine(
|
||||
abi: Abi.macosArm64,
|
||||
withRbe: true,
|
||||
cannedProcesses: cannedProcesses,
|
||||
);
|
||||
addTearDown(testEnv.cleanup);
|
||||
|
||||
@ -254,7 +241,6 @@ void main() {
|
||||
final testEnv = TestEnvironment.withTestEngine(
|
||||
abi: Abi.macosArm64,
|
||||
withRbe: true,
|
||||
cannedProcesses: cannedProcesses,
|
||||
);
|
||||
addTearDown(testEnv.cleanup);
|
||||
|
||||
@ -298,7 +284,6 @@ void main() {
|
||||
test('build command fails when rbe is enabled but not supported', () async {
|
||||
final testEnv = TestEnvironment.withTestEngine(
|
||||
abi: Abi.macosArm64,
|
||||
cannedProcesses: cannedProcesses,
|
||||
// Intentionally omit withRbe: true.
|
||||
// That means the //flutter/build/rbe directory will not be created.
|
||||
);
|
||||
@ -335,7 +320,6 @@ void main() {
|
||||
final testEnv = TestEnvironment.withTestEngine(
|
||||
abi: Abi.macosArm64,
|
||||
withRbe: true,
|
||||
cannedProcesses: cannedProcesses,
|
||||
);
|
||||
addTearDown(testEnv.cleanup);
|
||||
|
||||
@ -383,7 +367,6 @@ void main() {
|
||||
() async {
|
||||
final testEnv = TestEnvironment.withTestEngine(
|
||||
abi: Abi.macosArm64,
|
||||
cannedProcesses: cannedProcesses,
|
||||
);
|
||||
addTearDown(testEnv.cleanup);
|
||||
|
||||
@ -423,9 +406,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('mangleConfigName removes the OS and adds ci/ as needed', () {
|
||||
final testEnv = TestEnvironment.withTestEngine(
|
||||
cannedProcesses: cannedProcesses,
|
||||
);
|
||||
final testEnv = TestEnvironment.withTestEngine();
|
||||
addTearDown(testEnv.cleanup);
|
||||
|
||||
final env = testEnv.environment;
|
||||
@ -434,9 +415,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('mangleConfigName throws when the input config name is malformed', () {
|
||||
final testEnv = TestEnvironment.withTestEngine(
|
||||
cannedProcesses: cannedProcesses,
|
||||
);
|
||||
final testEnv = TestEnvironment.withTestEngine();
|
||||
addTearDown(testEnv.cleanup);
|
||||
|
||||
final env = testEnv.environment;
|
||||
@ -447,9 +426,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('demangleConfigName adds the OS and removes ci/ as needed', () {
|
||||
final testEnv = TestEnvironment.withTestEngine(
|
||||
cannedProcesses: cannedProcesses,
|
||||
);
|
||||
final testEnv = TestEnvironment.withTestEngine();
|
||||
addTearDown(testEnv.cleanup);
|
||||
|
||||
final env = testEnv.environment;
|
||||
@ -467,9 +444,7 @@ void main() {
|
||||
final configs = <String, BuilderConfig>{
|
||||
'namespace_test_config': namespaceTestConfigs,
|
||||
};
|
||||
final testEnv = TestEnvironment.withTestEngine(
|
||||
cannedProcesses: cannedProcesses,
|
||||
);
|
||||
final testEnv = TestEnvironment.withTestEngine();
|
||||
addTearDown(testEnv.cleanup);
|
||||
|
||||
final runner = ToolCommandRunner(
|
||||
@ -496,9 +471,7 @@ void main() {
|
||||
final configs = <String, BuilderConfig>{
|
||||
'namespace_test_config': namespaceTestConfigs,
|
||||
};
|
||||
final testEnv = TestEnvironment.withTestEngine(
|
||||
cannedProcesses: cannedProcesses,
|
||||
);
|
||||
final testEnv = TestEnvironment.withTestEngine();
|
||||
addTearDown(testEnv.cleanup);
|
||||
|
||||
final runner = ToolCommandRunner(
|
||||
@ -519,7 +492,20 @@ void main() {
|
||||
test('build command invokes ninja with the specified target', () async {
|
||||
final testEnv = TestEnvironment.withTestEngine(
|
||||
abi: Abi.macosArm64,
|
||||
cannedProcesses: cannedProcesses,
|
||||
cannedProcesses: [
|
||||
CannedProcess(
|
||||
(command) => command.contains('desc'),
|
||||
stdout: convert.jsonEncode({
|
||||
'//flutter/fml:fml_arc_unittests': {
|
||||
'outputs': [
|
||||
'//out/host_debug/fml_arc_unittests',
|
||||
],
|
||||
'testonly': true,
|
||||
'type': 'executable',
|
||||
},
|
||||
}),
|
||||
),
|
||||
],
|
||||
);
|
||||
addTearDown(testEnv.cleanup);
|
||||
|
||||
@ -571,7 +557,34 @@ void main() {
|
||||
test('build command invokes ninja with all matched targets', () async {
|
||||
final testEnv = TestEnvironment.withTestEngine(
|
||||
abi: Abi.macosArm64,
|
||||
cannedProcesses: cannedProcesses,
|
||||
cannedProcesses: [
|
||||
CannedProcess(
|
||||
(command) => command.contains('desc'),
|
||||
stdout: convert.jsonEncode({
|
||||
'//flutter/display_list:display_list_unittests': {
|
||||
'outputs': [
|
||||
'//out/host_debug/display_list_unittests',
|
||||
],
|
||||
'testonly': true,
|
||||
'type': 'executable',
|
||||
},
|
||||
'//flutter/flow:flow_unittests': {
|
||||
'outputs': [
|
||||
'//out/host_debug/flow_unittests',
|
||||
],
|
||||
'testonly': true,
|
||||
'type': 'executable',
|
||||
},
|
||||
'//flutter/fml:fml_arc_unittests': {
|
||||
'outputs': [
|
||||
'//out/host_debug/fml_arc_unittests',
|
||||
],
|
||||
'testonly': true,
|
||||
'type': 'executable',
|
||||
},
|
||||
}),
|
||||
),
|
||||
],
|
||||
);
|
||||
addTearDown(testEnv.cleanup);
|
||||
|
||||
@ -623,18 +636,17 @@ void main() {
|
||||
});
|
||||
|
||||
test('build command gracefully handles no matched targets', () async {
|
||||
final cannedProcesses = [
|
||||
CannedProcess(
|
||||
(command) => command.contains('desc'),
|
||||
stdout: fixtures.gnDescOutputEmpty(
|
||||
gnPattern: 'testing/scenario_app:sceario_app',
|
||||
),
|
||||
exitCode: 1,
|
||||
),
|
||||
];
|
||||
final testEnv = TestEnvironment.withTestEngine(
|
||||
abi: Abi.macosArm64,
|
||||
cannedProcesses: cannedProcesses,
|
||||
cannedProcesses: [
|
||||
CannedProcess(
|
||||
(command) => command.contains('desc'),
|
||||
stdout: '''
|
||||
The input testing/scenario_app:sceario_app matches no targets, configs or files.
|
||||
''',
|
||||
exitCode: 1,
|
||||
),
|
||||
],
|
||||
);
|
||||
addTearDown(testEnv.cleanup);
|
||||
|
||||
@ -671,7 +683,6 @@ void main() {
|
||||
|
||||
test('et help build line length is not too big', () async {
|
||||
final testEnv = TestEnvironment.withTestEngine(
|
||||
cannedProcesses: cannedProcesses,
|
||||
verbose: true,
|
||||
);
|
||||
addTearDown(testEnv.cleanup);
|
||||
@ -699,7 +710,6 @@ void main() {
|
||||
test('verbose "et help build" contains CI builds', () async {
|
||||
final testEnv = TestEnvironment.withTestEngine(
|
||||
abi: Abi.macosArm64,
|
||||
cannedProcesses: cannedProcesses,
|
||||
verbose: true,
|
||||
);
|
||||
addTearDown(testEnv.cleanup);
|
||||
@ -740,7 +750,6 @@ void main() {
|
||||
test('non-verbose "et help build" does not contain ci builds', () async {
|
||||
final testEnv = TestEnvironment.withTestEngine(
|
||||
abi: Abi.macosArm64,
|
||||
cannedProcesses: cannedProcesses,
|
||||
);
|
||||
addTearDown(testEnv.cleanup);
|
||||
|
||||
|
||||
@ -226,102 +226,3 @@ String attachedDevices() => '''
|
||||
}
|
||||
]
|
||||
''';
|
||||
|
||||
String gnDescOutput() => '''
|
||||
{
|
||||
"//flutter/display_list:display_list_unittests": {
|
||||
"all_dependent_configs": [ "//flutter/skia:fontmgr_mac_ct_public", "//flutter/skia:gpu_public", "//flutter/skia:gpu_shared_public", "//flutter/skia:jpeg_encode_public", "//flutter/skia:png_encode_public", "//flutter/skia:webp_encode_public", "//flutter/skia:jpeg_decode_public", "//flutter/skia:png_decode_public", "//flutter/skia:webp_decode_public", "//flutter/skia:wuffs_public", "//flutter/skia:xml_public" ],
|
||||
"allow_circular_includes_from": [ ],
|
||||
"asmflags": [ "-fno-strict-aliasing", "-fstack-protector-all", "--target=x86_64-apple-macos", "-arch", "x86_64", "-fcolor-diagnostics" ],
|
||||
"cflags": [ "-fno-strict-aliasing", "-fstack-protector-all", "--target=x86_64-apple-macos", "-arch", "x86_64", "-fcolor-diagnostics", "-Wall", "-Wextra", "-Wendif-labels", "-Werror", "-Wno-missing-field-initializers", "-Wno-unused-parameter", "-Wno-unused-but-set-parameter", "-Wno-unused-but-set-variable", "-Wno-implicit-int-float-conversion", "-Wno-deprecated-copy", "-Wno-psabi", "-Wno-deprecated-literal-operator", "-Wno-unqualified-std-cast-call", "-Wno-non-c-typedef-for-linkage", "-Wno-range-loop-construct", "-Wunguarded-availability", "-Wno-deprecated-declarations", "-fvisibility=hidden", "-Wstring-conversion", "-Wnewline-eof", "-O2", "-fno-ident", "-fdata-sections", "-ffunction-sections", "-g2", "-Wunreachable-code", "-Wno-newline-eof" ],
|
||||
"cflags_c": [ "-std=c99" ],
|
||||
"cflags_cc": [ "-fvisibility-inlines-hidden", "-std=c++17", "-fno-rtti", "-nostdinc++", "-nostdinc++", "-fvisibility=hidden", "-fno-exceptions", "-stdlib=libc++", "-Wno-inconsistent-missing-override" ],
|
||||
"cflags_objcc": [ "-fvisibility-inlines-hidden", "-fobjc-call-cxx-cdtors", "-std=c++17", "-fno-rtti", "-nostdinc++", "-nostdinc++", "-fvisibility=hidden", "-fno-exceptions", "-Wno-unguarded-availability" ],
|
||||
"check_includes": true,
|
||||
"configs": [ "//build/config:feature_flags", "//build/config/compiler:compiler", "//build/config/compiler:cxx_version_default", "//build/config/compiler:compiler_arm_fpu", "//build/config/compiler:chromium_code", "//build/config/compiler:default_include_dirs", "//build/config/compiler:no_rtti", "//build/config/compiler:runtime_library", "//third_party/libcxxabi:libcxxabi_config", "//third_party/libcxx:libcxx_config", "//build/config/gcc:no_exceptions", "//build/config/gcc:symbol_visibility_hidden", "//build/config:symbol_visibility_hidden", "//build/config/mac:sdk", "//build/config/clang:extra_warnings", "//build/config/clang:find_bad_constructs", "//build/config:release", "//build/config/compiler:optimize", "//build/config/compiler:default_optimization", "//build/config/compiler:symbols", "//build/config:default_libs", "//build/config/mac:mac_dynamic_flags", "//build/config/mac:mac_executable_flags", "//flutter/skia:fontmgr_mac_ct_public", "//flutter/skia:gpu_public", "//flutter/skia:gpu_shared_public", "//flutter/skia:jpeg_encode_public", "//flutter/skia:png_encode_public", "//flutter/skia:webp_encode_public", "//flutter/skia:jpeg_decode_public", "//flutter/skia:png_decode_public", "//flutter/skia:webp_decode_public", "//flutter/skia:wuffs_public", "//flutter/skia:xml_public", "//flutter/display_list:display_list_config", "//flutter:config", "//flutter/common:flutter_config", "//flutter/impeller:impeller_public_config", "//flutter/impeller/runtime_stage:runtime_stage_config", "//flutter/third_party/flatbuffers:flatbuffers_public_configs", "//flutter/impeller/renderer:embed_embed_mtl_compute_shaders", "//flutter/impeller/renderer:reflect_reflect_mtl_compute_shaders", "//flutter/impeller/renderer:embed_embed_vk_compute_shaders", "//flutter/skia:skia_public", "//flutter/testing:dynamic_symbols", "//flutter/third_party/googletest:gmock_config", "//flutter/third_party/googletest:gtest_config" ],
|
||||
"defines": [ "USE_OPENSSL=1", "__STDC_CONSTANT_MACROS", "__STDC_FORMAT_MACROS", "_FORTIFY_SOURCE=2", "_LIBCPP_DISABLE_AVAILABILITY=1", "_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS", "NDEBUG", "NVALGRIND", "DYNAMIC_ANNOTATIONS_ENABLED=0", "SK_TYPEFACE_FACTORY_CORETEXT", "SK_FONTMGR_CORETEXT_AVAILABLE", "SK_GL", "SK_METAL", "SK_CODEC_DECODES_JPEG", "SK_CODEC_DECODES_PNG", "SK_CODEC_DECODES_ICO", "SK_CODEC_DECODES_WEBP", "SK_HAS_WUFFS_LIBRARY", "SK_CODEC_DECODES_GIF", "SK_XML", "FLUTTER_RUNTIME_MODE_DEBUG=1", "FLUTTER_RUNTIME_MODE_PROFILE=2", "FLUTTER_RUNTIME_MODE_RELEASE=3", "FLUTTER_RUNTIME_MODE_JIT_RELEASE=4", "DART_LEGACY_API=[[deprecated]]", "FLUTTER_RUNTIME_MODE=1", "FLUTTER_JIT_RUNTIME=1", "IMPELLER_DEBUG=1", "IMPELLER_ENABLE_CAPTURE=1", "IMPELLER_SUPPORTS_RENDERING=1", "IMPELLER_ENABLE_METAL=1", "IMPELLER_ENABLE_OPENGLES=1", "IMPELLER_ENABLE_VULKAN=1", "SK_CODEC_DECODES_BMP", "SK_CODEC_DECODES_WBMP", "SK_ENABLE_DUMP_GPU", "SK_FORCE_AAA", "SK_LEGACY_IGNORE_DRAW_VERTICES_BLEND_WITH_NO_SHADER", "SK_RESOLVE_FILTERS_BEFORE_RESTORE", "SK_DISABLE_LEGACY_METAL_BACKEND_SURFACE", "SK_DISABLE_LEGACY_SHADERCONTEXT", "SK_DISABLE_LOWP_RASTER_PIPELINE", "SK_FORCE_RASTER_PIPELINE_BLITTER", "SK_METAL_WAIT_UNTIL_SCHEDULED", "SK_DISABLE_EFFECT_DESERIALIZATION", "SK_ENABLE_PRECOMPILE", "SK_GANESH", "SK_USE_PERFETTO" ],
|
||||
"deps": [ "//flutter/display_list:display_list", "//flutter/display_list:display_list_fixtures", "//flutter/display_list/testing:display_list_testing", "//flutter/testing:skia", "//flutter/testing:testing", "//third_party/libcxx:libcxx" ],
|
||||
"externs": {
|
||||
|
||||
},
|
||||
"frameworks": [ "Foundation.framework", "ApplicationServices.framework", "OpenGL.framework", "AppKit.framework", "Metal.framework" ],
|
||||
"include_dirs": [ "//", "//out/host_debug/gen/", "//third_party/libcxx/include/", "//third_party/libcxxabi/include/", "//flutter/build/secondary/third_party/libcxx/config/", "//flutter/", "//out/host_debug/gen/flutter/", "//out/host_debug/gen/flutter/impeller/runtime_stage/", "//flutter/third_party/flatbuffers/include/", "//flutter/third_party/skia/", "//flutter/third_party/googletest/googlemock/include/", "//flutter/third_party/googletest/googletest/include/" ],
|
||||
"ldflags": [ "--target=x86_64-apple-macos", "-arch", "x86_64", "-nostdlib++", "-Wl,-dead_strip", "-Wl,-search_paths_first", "-L.", "-Wl,-rpath,@loader_path/.", "-Wl,-rpath,/usr/local/lib/.", "-Wl,-rpath,@loader_path/../../..", "-Wl,-pie" ],
|
||||
"libs": [ "dl" ],
|
||||
"metadata": {
|
||||
|
||||
},
|
||||
"outputs": [ "//out/host_debug/display_list_unittests" ],
|
||||
"public": "*",
|
||||
"sources": [ "//flutter/display_list/benchmarking/dl_complexity_unittests.cc", "//flutter/display_list/display_list_unittests.cc", "//flutter/display_list/dl_color_unittests.cc", "//flutter/display_list/dl_paint_unittests.cc", "//flutter/display_list/dl_vertices_unittests.cc", "//flutter/display_list/effects/dl_color_filter_unittests.cc", "//flutter/display_list/effects/dl_color_source_unittests.cc", "//flutter/display_list/effects/dl_image_filter_unittests.cc", "//flutter/display_list/effects/dl_mask_filter_unittests.cc", "//flutter/display_list/effects/dl_path_effect_unittests.cc", "//flutter/display_list/geometry/dl_region_unittests.cc", "//flutter/display_list/geometry/dl_rtree_unittests.cc", "//flutter/display_list/skia/dl_sk_conversions_unittests.cc", "//flutter/display_list/skia/dl_sk_paint_dispatcher_unittests.cc", "//flutter/display_list/utils/dl_matrix_clip_tracker_unittests.cc" ],
|
||||
"testonly": true,
|
||||
"toolchain": "//build/toolchain/mac:clang_x64",
|
||||
"type": "executable",
|
||||
"visibility": [ "*" ]
|
||||
},
|
||||
"//flutter/flow:flow_unittests": {
|
||||
"all_dependent_configs": [ "//flutter/skia:fontmgr_mac_ct_public", "//flutter/skia:gpu_public", "//flutter/skia:gpu_shared_public", "//flutter/skia:jpeg_encode_public", "//flutter/skia:png_encode_public", "//flutter/skia:webp_encode_public", "//flutter/skia:jpeg_decode_public", "//flutter/skia:png_decode_public", "//flutter/skia:webp_decode_public", "//flutter/skia:wuffs_public", "//flutter/skia:xml_public" ],
|
||||
"allow_circular_includes_from": [ ],
|
||||
"asmflags": [ "-fno-strict-aliasing", "-fstack-protector-all", "--target=x86_64-apple-macos", "-arch", "x86_64", "-fcolor-diagnostics" ],
|
||||
"cflags": [ "-fno-strict-aliasing", "-fstack-protector-all", "--target=x86_64-apple-macos", "-arch", "x86_64", "-fcolor-diagnostics", "-Wall", "-Wextra", "-Wendif-labels", "-Werror", "-Wno-missing-field-initializers", "-Wno-unused-parameter", "-Wno-unused-but-set-parameter", "-Wno-unused-but-set-variable", "-Wno-implicit-int-float-conversion", "-Wno-deprecated-copy", "-Wno-psabi", "-Wno-deprecated-literal-operator", "-Wno-unqualified-std-cast-call", "-Wno-non-c-typedef-for-linkage", "-Wno-range-loop-construct", "-Wunguarded-availability", "-Wno-deprecated-declarations", "-fvisibility=hidden", "-Wstring-conversion", "-Wnewline-eof", "-O2", "-fno-ident", "-fdata-sections", "-ffunction-sections", "-g2", "-Wunreachable-code", "-Wno-newline-eof" ],
|
||||
"cflags_c": [ "-std=c99" ],
|
||||
"cflags_cc": [ "-fvisibility-inlines-hidden", "-std=c++17", "-fno-rtti", "-nostdinc++", "-nostdinc++", "-fvisibility=hidden", "-fno-exceptions", "-stdlib=libc++", "-Wno-inconsistent-missing-override" ],
|
||||
"cflags_objcc": [ "-fvisibility-inlines-hidden", "-fobjc-call-cxx-cdtors", "-std=c++17", "-fno-rtti", "-nostdinc++", "-nostdinc++", "-fvisibility=hidden", "-fno-exceptions", "-Wno-unguarded-availability" ],
|
||||
"check_includes": true,
|
||||
"configs": [ "//build/config:feature_flags", "//build/config/compiler:compiler", "//build/config/compiler:cxx_version_default", "//build/config/compiler:compiler_arm_fpu", "//build/config/compiler:chromium_code", "//build/config/compiler:default_include_dirs", "//build/config/compiler:no_rtti", "//build/config/compiler:runtime_library", "//third_party/libcxxabi:libcxxabi_config", "//third_party/libcxx:libcxx_config", "//build/config/gcc:no_exceptions", "//build/config/gcc:symbol_visibility_hidden", "//build/config:symbol_visibility_hidden", "//build/config/mac:sdk", "//build/config/clang:extra_warnings", "//build/config/clang:find_bad_constructs", "//build/config:release", "//build/config/compiler:optimize", "//build/config/compiler:default_optimization", "//build/config/compiler:symbols", "//build/config:default_libs", "//build/config/mac:mac_dynamic_flags", "//build/config/mac:mac_executable_flags", "//flutter/skia:fontmgr_mac_ct_public", "//flutter/skia:gpu_public", "//flutter/skia:gpu_shared_public", "//flutter/skia:jpeg_encode_public", "//flutter/skia:png_encode_public", "//flutter/skia:webp_encode_public", "//flutter/skia:jpeg_decode_public", "//flutter/skia:png_decode_public", "//flutter/skia:webp_decode_public", "//flutter/skia:wuffs_public", "//flutter/skia:xml_public", "//flutter:config", "//flutter/common:flutter_config", "//flutter/display_list:display_list_config", "//flutter/impeller:impeller_public_config", "//flutter/impeller/runtime_stage:runtime_stage_config", "//flutter/third_party/flatbuffers:flatbuffers_public_configs", "//flutter/impeller/renderer:embed_embed_mtl_compute_shaders", "//flutter/impeller/renderer:reflect_reflect_mtl_compute_shaders", "//flutter/impeller/renderer:embed_embed_vk_compute_shaders", "//flutter/skia:skia_public", "//flutter/third_party/txt:txt_config", "//flutter/third_party/harfbuzz:harfbuzz_config", "//flutter/third_party/icu:icu_config", "//flutter/third_party/googletest:gmock_config", "//flutter/third_party/googletest:gtest_config", "//third_party/dart/runtime:dart_public_config" ],
|
||||
"defines": [ "USE_OPENSSL=1", "__STDC_CONSTANT_MACROS", "__STDC_FORMAT_MACROS", "_FORTIFY_SOURCE=2", "_LIBCPP_DISABLE_AVAILABILITY=1", "_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS", "NDEBUG", "NVALGRIND", "DYNAMIC_ANNOTATIONS_ENABLED=0", "SK_TYPEFACE_FACTORY_CORETEXT", "SK_FONTMGR_CORETEXT_AVAILABLE", "SK_GL", "SK_METAL", "SK_CODEC_DECODES_JPEG", "SK_CODEC_DECODES_PNG", "SK_CODEC_DECODES_ICO", "SK_CODEC_DECODES_WEBP", "SK_HAS_WUFFS_LIBRARY", "SK_CODEC_DECODES_GIF", "SK_XML", "FLUTTER_RUNTIME_MODE_DEBUG=1", "FLUTTER_RUNTIME_MODE_PROFILE=2", "FLUTTER_RUNTIME_MODE_RELEASE=3", "FLUTTER_RUNTIME_MODE_JIT_RELEASE=4", "DART_LEGACY_API=[[deprecated]]", "FLUTTER_RUNTIME_MODE=1", "FLUTTER_JIT_RUNTIME=1", "IMPELLER_DEBUG=1", "IMPELLER_ENABLE_CAPTURE=1", "IMPELLER_SUPPORTS_RENDERING=1", "IMPELLER_ENABLE_METAL=1", "IMPELLER_ENABLE_OPENGLES=1", "IMPELLER_ENABLE_VULKAN=1", "SK_CODEC_DECODES_BMP", "SK_CODEC_DECODES_WBMP", "SK_ENABLE_DUMP_GPU", "SK_FORCE_AAA", "SK_LEGACY_IGNORE_DRAW_VERTICES_BLEND_WITH_NO_SHADER", "SK_RESOLVE_FILTERS_BEFORE_RESTORE", "SK_DISABLE_LEGACY_METAL_BACKEND_SURFACE", "SK_DISABLE_LEGACY_SHADERCONTEXT", "SK_DISABLE_LOWP_RASTER_PIPELINE", "SK_FORCE_RASTER_PIPELINE_BLITTER", "SK_METAL_WAIT_UNTIL_SCHEDULED", "SK_DISABLE_EFFECT_DESERIALIZATION", "SK_ENABLE_PRECOMPILE", "SK_GANESH", "SK_USE_PERFETTO", "U_USING_ICU_NAMESPACE=0", "U_ENABLE_DYLOAD=0", "USE_CHROMIUM_ICU=1", "U_ENABLE_TRACING=1", "U_ENABLE_RESOURCE_TRACING=0", "U_STATIC_IMPLEMENTATION", "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE" ],
|
||||
"deps": [ "//flutter/common/graphics:graphics", "//flutter/display_list/testing:display_list_testing", "//flutter/flow:flow", "//flutter/flow:flow_fixtures", "//flutter/flow:flow_testing", "//flutter/fml:fml", "//flutter/shell/common:base64", "//flutter/skia:skia", "//flutter/testing:skia", "//flutter/testing:testing_lib", "//flutter/third_party/googletest:gtest", "//third_party/dart/runtime:libdart_jit", "//third_party/libcxx:libcxx" ],
|
||||
"externs": {
|
||||
|
||||
},
|
||||
"frameworks": [ "Foundation.framework", "ApplicationServices.framework", "OpenGL.framework", "AppKit.framework", "Metal.framework" ],
|
||||
"include_dirs": [ "//", "//out/host_debug/gen/", "//third_party/libcxx/include/", "//third_party/libcxxabi/include/", "//flutter/build/secondary/third_party/libcxx/config/", "//flutter/", "//out/host_debug/gen/flutter/", "//out/host_debug/gen/flutter/impeller/runtime_stage/", "//flutter/third_party/flatbuffers/include/", "//flutter/third_party/skia/", "//flutter/third_party/txt/src/", "//flutter/third_party/harfbuzz/src/", "//flutter/third_party/icu/source/common/", "//flutter/third_party/icu/source/i18n/", "//flutter/third_party/googletest/googlemock/include/", "//flutter/third_party/googletest/googletest/include/", "//third_party/dart/runtime/", "//third_party/dart/runtime/include/" ],
|
||||
"ldflags": [ "--target=x86_64-apple-macos", "-arch", "x86_64", "-nostdlib++", "-Wl,-dead_strip", "-Wl,-search_paths_first", "-L.", "-Wl,-rpath,@loader_path/.", "-Wl,-rpath,/usr/local/lib/.", "-Wl,-rpath,@loader_path/../../..", "-Wl,-pie" ],
|
||||
"libs": [ "dl", "pthread" ],
|
||||
"metadata": {
|
||||
|
||||
},
|
||||
"outputs": [ "//out/host_debug/flow_unittests" ],
|
||||
"public": "*",
|
||||
"sources": [ "//flutter/flow/diff_context_unittests.cc", "//flutter/flow/embedded_view_params_unittests.cc", "//flutter/flow/flow_run_all_unittests.cc", "//flutter/flow/flow_test_utils.cc", "//flutter/flow/flow_test_utils.h", "//flutter/flow/frame_timings_recorder_unittests.cc", "//flutter/flow/gl_context_switch_unittests.cc", "//flutter/flow/layers/backdrop_filter_layer_unittests.cc", "//flutter/flow/layers/checkerboard_layertree_unittests.cc", "//flutter/flow/layers/clip_path_layer_unittests.cc", "//flutter/flow/layers/clip_rect_layer_unittests.cc", "//flutter/flow/layers/clip_rrect_layer_unittests.cc", "//flutter/flow/layers/color_filter_layer_unittests.cc", "//flutter/flow/layers/container_layer_unittests.cc", "//flutter/flow/layers/display_list_layer_unittests.cc", "//flutter/flow/layers/image_filter_layer_unittests.cc", "//flutter/flow/layers/layer_state_stack_unittests.cc", "//flutter/flow/layers/layer_tree_unittests.cc", "//flutter/flow/layers/offscreen_surface_unittests.cc", "//flutter/flow/layers/opacity_layer_unittests.cc", "//flutter/flow/layers/performance_overlay_layer_unittests.cc", "//flutter/flow/layers/platform_view_layer_unittests.cc", "//flutter/flow/layers/shader_mask_layer_unittests.cc", "//flutter/flow/layers/texture_layer_unittests.cc", "//flutter/flow/layers/transform_layer_unittests.cc", "//flutter/flow/mutators_stack_unittests.cc", "//flutter/flow/raster_cache_unittests.cc", "//flutter/flow/skia_gpu_object_unittests.cc", "//flutter/flow/stopwatch_dl_unittests.cc", "//flutter/flow/stopwatch_unittests.cc", "//flutter/flow/surface_frame_unittests.cc", "//flutter/flow/testing/mock_layer_unittests.cc", "//flutter/flow/testing/mock_texture_unittests.cc", "//flutter/flow/texture_unittests.cc" ],
|
||||
"testonly": true,
|
||||
"toolchain": "//build/toolchain/mac:clang_x64",
|
||||
"type": "executable",
|
||||
"visibility": [ "*" ]
|
||||
},
|
||||
"//flutter/fml:fml_arc_unittests": {
|
||||
"all_dependent_configs": [ "//flutter/skia:fontmgr_mac_ct_public", "//flutter/skia:gpu_public", "//flutter/skia:gpu_shared_public", "//flutter/skia:jpeg_encode_public", "//flutter/skia:png_encode_public", "//flutter/skia:webp_encode_public", "//flutter/skia:jpeg_decode_public", "//flutter/skia:png_decode_public", "//flutter/skia:webp_decode_public", "//flutter/skia:wuffs_public", "//flutter/skia:xml_public" ],
|
||||
"allow_circular_includes_from": [ ],
|
||||
"asmflags": [ "-fno-strict-aliasing", "-fstack-protector-all", "--target=x86_64-apple-macos", "-arch", "x86_64", "-fcolor-diagnostics" ],
|
||||
"cflags": [ "-fno-strict-aliasing", "-fstack-protector-all", "--target=x86_64-apple-macos", "-arch", "x86_64", "-fcolor-diagnostics", "-Wall", "-Wextra", "-Wendif-labels", "-Werror", "-Wno-missing-field-initializers", "-Wno-unused-parameter", "-Wno-unused-but-set-parameter", "-Wno-unused-but-set-variable", "-Wno-implicit-int-float-conversion", "-Wno-deprecated-copy", "-Wno-psabi", "-Wno-deprecated-literal-operator", "-Wno-unqualified-std-cast-call", "-Wno-non-c-typedef-for-linkage", "-Wno-range-loop-construct", "-Wunguarded-availability", "-Wno-deprecated-declarations", "-fvisibility=hidden", "-Wstring-conversion", "-Wnewline-eof", "-O2", "-fno-ident", "-fdata-sections", "-ffunction-sections", "-g2", "-Wunreachable-code", "-Wno-newline-eof" ],
|
||||
"cflags_c": [ "-std=c99" ],
|
||||
"cflags_cc": [ "-fvisibility-inlines-hidden", "-std=c++17", "-fno-rtti", "-nostdinc++", "-nostdinc++", "-fvisibility=hidden", "-fno-exceptions", "-stdlib=libc++", "-Wno-inconsistent-missing-override" ],
|
||||
"cflags_objcc": [ "-Werror=overriding-method-mismatch", "-Werror=undeclared-selector", "-fapplication-extension", "-fobjc-arc", "-fvisibility-inlines-hidden", "-fobjc-call-cxx-cdtors", "-std=c++17", "-fno-rtti", "-nostdinc++", "-nostdinc++", "-fvisibility=hidden", "-fno-exceptions", "-Wno-unguarded-availability" ],
|
||||
"check_includes": true,
|
||||
"configs": [ "//build/config:feature_flags", "//build/config/compiler:compiler", "//build/config/compiler:cxx_version_default", "//build/config/compiler:compiler_arm_fpu", "//build/config/compiler:chromium_code", "//build/config/compiler:default_include_dirs", "//build/config/compiler:no_rtti", "//build/config/compiler:runtime_library", "//third_party/libcxxabi:libcxxabi_config", "//third_party/libcxx:libcxx_config", "//build/config/gcc:no_exceptions", "//build/config/gcc:symbol_visibility_hidden", "//build/config:symbol_visibility_hidden", "//build/config/mac:sdk", "//build/config/clang:extra_warnings", "//build/config/clang:find_bad_constructs", "//build/config:release", "//build/config/compiler:optimize", "//build/config/compiler:default_optimization", "//build/config/compiler:symbols", "//build/config:default_libs", "//build/config/mac:mac_dynamic_flags", "//build/config/mac:mac_executable_flags", "//flutter/skia:fontmgr_mac_ct_public", "//flutter/skia:gpu_public", "//flutter/skia:gpu_shared_public", "//flutter/skia:jpeg_encode_public", "//flutter/skia:png_encode_public", "//flutter/skia:webp_encode_public", "//flutter/skia:jpeg_decode_public", "//flutter/skia:png_decode_public", "//flutter/skia:webp_decode_public", "//flutter/skia:wuffs_public", "//flutter/skia:xml_public", "//flutter:config", "//flutter/common:flutter_config", "//flutter/testing:dynamic_symbols", "//flutter/display_list:display_list_config", "//flutter/impeller:impeller_public_config", "//flutter/impeller/runtime_stage:runtime_stage_config", "//flutter/third_party/flatbuffers:flatbuffers_public_configs", "//flutter/impeller/renderer:embed_embed_mtl_compute_shaders", "//flutter/impeller/renderer:reflect_reflect_mtl_compute_shaders", "//flutter/impeller/renderer:embed_embed_vk_compute_shaders", "//flutter/skia:skia_public", "//flutter/third_party/googletest:gmock_config", "//flutter/third_party/googletest:gtest_config" ],
|
||||
"defines": [ "USE_OPENSSL=1", "__STDC_CONSTANT_MACROS", "__STDC_FORMAT_MACROS", "_FORTIFY_SOURCE=2", "_LIBCPP_DISABLE_AVAILABILITY=1", "_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS", "NDEBUG", "NVALGRIND", "DYNAMIC_ANNOTATIONS_ENABLED=0", "SK_TYPEFACE_FACTORY_CORETEXT", "SK_FONTMGR_CORETEXT_AVAILABLE", "SK_GL", "SK_METAL", "SK_CODEC_DECODES_JPEG", "SK_CODEC_DECODES_PNG", "SK_CODEC_DECODES_ICO", "SK_CODEC_DECODES_WEBP", "SK_HAS_WUFFS_LIBRARY", "SK_CODEC_DECODES_GIF", "SK_XML", "FLUTTER_RUNTIME_MODE_DEBUG=1", "FLUTTER_RUNTIME_MODE_PROFILE=2", "FLUTTER_RUNTIME_MODE_RELEASE=3", "FLUTTER_RUNTIME_MODE_JIT_RELEASE=4", "DART_LEGACY_API=[[deprecated]]", "FLUTTER_RUNTIME_MODE=1", "FLUTTER_JIT_RUNTIME=1", "IMPELLER_DEBUG=1", "IMPELLER_ENABLE_CAPTURE=1", "IMPELLER_SUPPORTS_RENDERING=1", "IMPELLER_ENABLE_METAL=1", "IMPELLER_ENABLE_OPENGLES=1", "IMPELLER_ENABLE_VULKAN=1", "SK_CODEC_DECODES_BMP", "SK_CODEC_DECODES_WBMP", "SK_ENABLE_DUMP_GPU", "SK_FORCE_AAA", "SK_LEGACY_IGNORE_DRAW_VERTICES_BLEND_WITH_NO_SHADER", "SK_RESOLVE_FILTERS_BEFORE_RESTORE", "SK_DISABLE_LEGACY_METAL_BACKEND_SURFACE", "SK_DISABLE_LEGACY_SHADERCONTEXT", "SK_DISABLE_LOWP_RASTER_PIPELINE", "SK_FORCE_RASTER_PIPELINE_BLITTER", "SK_METAL_WAIT_UNTIL_SCHEDULED", "SK_DISABLE_EFFECT_DESERIALIZATION", "SK_ENABLE_PRECOMPILE", "SK_GANESH", "SK_USE_PERFETTO" ],
|
||||
"deps": [ "//flutter/fml:fml", "//flutter/fml:fml_fixtures", "//flutter/testing:testing", "//third_party/libcxx:libcxx" ],
|
||||
"externs": {
|
||||
|
||||
},
|
||||
"frameworks": [ "Foundation.framework", "ApplicationServices.framework", "OpenGL.framework", "AppKit.framework", "Metal.framework" ],
|
||||
"include_dirs": [ "//", "//out/host_debug/gen/", "//third_party/libcxx/include/", "//third_party/libcxxabi/include/", "//flutter/build/secondary/third_party/libcxx/config/", "//flutter/", "//out/host_debug/gen/flutter/", "//out/host_debug/gen/flutter/impeller/runtime_stage/", "//flutter/third_party/flatbuffers/include/", "//flutter/third_party/skia/", "//flutter/third_party/googletest/googlemock/include/", "//flutter/third_party/googletest/googletest/include/" ],
|
||||
"ldflags": [ "--target=x86_64-apple-macos", "-arch", "x86_64", "-nostdlib++", "-Wl,-dead_strip", "-Wl,-search_paths_first", "-L.", "-Wl,-rpath,@loader_path/.", "-Wl,-rpath,/usr/local/lib/.", "-Wl,-rpath,@loader_path/../../..", "-Wl,-pie" ],
|
||||
"libs": [ "dl" ],
|
||||
"metadata": {
|
||||
|
||||
},
|
||||
"outputs": [ "//out/host_debug/fml_arc_unittests" ],
|
||||
"public": "*",
|
||||
"sources": [ "//flutter/fml/platform/darwin/scoped_nsobject_arc_unittests.mm", "//flutter/fml/platform/darwin/weak_nsobject_arc_unittests.mm" ],
|
||||
"testonly": true,
|
||||
"toolchain": "//build/toolchain/mac:clang_x64",
|
||||
"type": "executable",
|
||||
"visibility": [ "*" ]
|
||||
}
|
||||
}
|
||||
''';
|
||||
|
||||
String gnDescOutputEmpty({required String gnPattern}) => '''
|
||||
The input $gnPattern matches no targets, configs or files.
|
||||
''';
|
||||
|
||||
@ -2,13 +2,13 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'dart:convert';
|
||||
import 'dart:ffi' show Abi;
|
||||
|
||||
import 'package:engine_tool/src/commands/command_runner.dart';
|
||||
import 'package:logging/logging.dart' as log;
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import 'fixtures.dart' as fixtures;
|
||||
import 'src/test_build_configs.dart';
|
||||
import 'utils.dart';
|
||||
|
||||
@ -17,19 +17,11 @@ void main() {
|
||||
return logs.map((log.LogRecord r) => r.message).toList();
|
||||
}
|
||||
|
||||
final cannedProcesses = <CannedProcess>[
|
||||
CannedProcess(
|
||||
(command) => command.contains('desc'),
|
||||
stdout: fixtures.gnDescOutput(),
|
||||
),
|
||||
];
|
||||
|
||||
test('query command returns builds for the host platform.', () async {
|
||||
final testEnvironment = TestEnvironment.withTestEngine(
|
||||
// Intentionally use the default parameter to make it explicit.
|
||||
// ignore: avoid_redundant_argument_values
|
||||
abi: Abi.linuxX64,
|
||||
cannedProcesses: cannedProcesses,
|
||||
);
|
||||
addTearDown(testEnvironment.cleanup);
|
||||
|
||||
@ -132,7 +124,6 @@ void main() {
|
||||
// Intentionally use the default parameter to make it explicit.
|
||||
// ignore: avoid_redundant_argument_values
|
||||
abi: Abi.linuxX64,
|
||||
cannedProcesses: cannedProcesses,
|
||||
);
|
||||
addTearDown(testEnvironment.cleanup);
|
||||
|
||||
@ -206,9 +197,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('query command with --all returns all builds.', () async {
|
||||
final testEnvironment = TestEnvironment.withTestEngine(
|
||||
cannedProcesses: cannedProcesses,
|
||||
);
|
||||
final testEnvironment = TestEnvironment.withTestEngine();
|
||||
addTearDown(testEnvironment.cleanup);
|
||||
|
||||
final linuxBuilders1 = TestBuilderConfig();
|
||||
@ -313,7 +302,34 @@ void main() {
|
||||
|
||||
test('query targets', () async {
|
||||
final testEnvironment = TestEnvironment.withTestEngine(
|
||||
cannedProcesses: cannedProcesses,
|
||||
cannedProcesses: [
|
||||
CannedProcess(
|
||||
(command) => command.contains('desc'),
|
||||
stdout: jsonEncode({
|
||||
'//flutter/display_list:display_list_unittests': {
|
||||
'outputs': [
|
||||
'//out/host_debug/display_list_unittests',
|
||||
],
|
||||
'testonly': true,
|
||||
'type': 'executable',
|
||||
},
|
||||
'//flutter/flow:flow_unittests': {
|
||||
'outputs': [
|
||||
'//out/host_debug/flow_unittests',
|
||||
],
|
||||
'testonly': true,
|
||||
'type': 'executable',
|
||||
},
|
||||
'//flutter/fml:fml_arc_unittests': {
|
||||
'outputs': [
|
||||
'//out/host_debug/fml_arc_unittests',
|
||||
],
|
||||
'testonly': true,
|
||||
'type': 'executable',
|
||||
},
|
||||
}),
|
||||
),
|
||||
],
|
||||
);
|
||||
addTearDown(testEnvironment.cleanup);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user