forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build testing/dart snapshots with GN instead of in run_tests.py (flut…
- Loading branch information
Showing
6 changed files
with
168 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# 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. | ||
|
||
import("//flutter/testing/dart/compile_test.gni") | ||
|
||
tests = [ | ||
"canvas_test.dart", | ||
"channel_buffers_test.dart", | ||
"codec_test.dart", | ||
"color_filter_test.dart", | ||
"color_test.dart", | ||
"compositing_test.dart", | ||
"dart_test.dart", | ||
"encoding_test.dart", | ||
"geometry_test.dart", | ||
"gradient_test.dart", | ||
"http_allow_http_connections_test.dart", | ||
"http_disallow_http_connections_test.dart", | ||
"image_descriptor_test.dart", | ||
"image_dispose_test.dart", | ||
"image_filter_test.dart", | ||
"image_resize_test.dart", | ||
"isolate_name_server_test.dart", | ||
"isolate_test.dart", | ||
"lerp_test.dart", | ||
"locale_test.dart", | ||
"paragraph_builder_test.dart", | ||
"paragraph_test.dart", | ||
"path_test.dart", | ||
"platform_view_test.dart", | ||
"plugin_utilities_test.dart", | ||
"semantics_test.dart", | ||
"spirv_exception_test.dart", | ||
"task_order_test.dart", | ||
"text_test.dart", | ||
"window_test.dart", | ||
] | ||
|
||
foreach(test, tests) { | ||
compile_flutter_dart_test("compile_$test") { | ||
dart_file = test | ||
dart_kernel = "$root_gen_dir/$test.dill" | ||
packages = ".packages" | ||
} | ||
} | ||
|
||
group("dart") { | ||
testonly = true | ||
deps = [ "//flutter/testing/dart/observatory" ] | ||
foreach(test, tests) { | ||
deps += [ ":compile_$test" ] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# 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. | ||
|
||
import("//third_party/dart/build/dart/dart_action.gni") | ||
|
||
# Generates a Dart kernel snapshot using flutter_frontend_server. | ||
# | ||
# Arguments | ||
# dart_main (required): The Main Dart file. | ||
# | ||
# dart_kernel (required): The path to the output kernel snapshot in the out | ||
# directory. | ||
# | ||
# packages (required): The path to the .packages file. | ||
template("compile_flutter_dart_test") { | ||
assert(defined(invoker.dart_file), "The Dart test file must be specified.") | ||
assert(defined(invoker.dart_kernel), | ||
"The Dart Kernel file location must be specified.") | ||
assert(defined(invoker.packages), | ||
"The path to the .packages file must be specified.") | ||
|
||
dart_action(target_name) { | ||
testonly = true | ||
deps = [] | ||
if (defined(invoker.deps)) { | ||
deps += invoker.deps | ||
} | ||
deps += [ | ||
"//flutter/flutter_frontend_server:frontend_server", | ||
"//flutter/lib/snapshot:strong_platform", | ||
] | ||
script = "$root_gen_dir/frontend_server.dart.snapshot" | ||
packages = rebase_path(invoker.packages) # rebase_path(".packages") | ||
|
||
inputs = [ invoker.dart_file ] | ||
outputs = [ invoker.dart_kernel ] | ||
|
||
snapshot_depfile = | ||
"$root_gen_dir/flutter/testing/snapshot_$target_name.depfile.d" | ||
depfile = snapshot_depfile | ||
|
||
flutter_patched_sdk = rebase_path("$root_out_dir/flutter_patched_sdk") | ||
|
||
vm_args = [ "--disable-dart-dev" ] | ||
|
||
args = [ | ||
"--sound-null-safety", | ||
"--sdk-root", | ||
flutter_patched_sdk, | ||
"--target=flutter", | ||
"--packages", | ||
packages, | ||
"--depfile", | ||
rebase_path(snapshot_depfile), | ||
"--output-dill", | ||
rebase_path(invoker.dart_kernel, root_out_dir), | ||
rebase_path(invoker.dart_file), | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# 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. | ||
|
||
import("//flutter/testing/dart/compile_test.gni") | ||
|
||
tests = [ "skp_test.dart" ] | ||
|
||
foreach(test, tests) { | ||
compile_flutter_dart_test("compile_$test") { | ||
dart_file = test | ||
dart_kernel = "$root_gen_dir/$test.dill" | ||
packages = "../.packages" | ||
} | ||
} | ||
|
||
group("observatory") { | ||
testonly = true | ||
deps = [] | ||
foreach(test, tests) { | ||
deps += [ ":compile_$test" ] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# 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. | ||
|
||
import("//flutter/testing/dart/compile_test.gni") | ||
|
||
tests = [ "fail_test.dart" ] | ||
|
||
foreach(test, tests) { | ||
compile_flutter_dart_test("compile_$test") { | ||
dart_file = test | ||
dart_kernel = "$root_gen_dir/$test.dill" | ||
packages = ".packages" | ||
} | ||
} | ||
|
||
group("smoke_test_failure") { | ||
testonly = true | ||
deps = [] | ||
foreach(test, tests) { | ||
deps += [ ":compile_$test" ] | ||
} | ||
} |