-
Notifications
You must be signed in to change notification settings - Fork 6k
Allow specifying both Dart and non-Dart fixtures in engine unit-tests. #9113
Conversation
This fixes numerous issues in the way in which fixtures were managed in the engine unit-tests. * Instead of only being able to specify Dart fixtures, unit-tests may specify non-Dart fixtures as well. These are simply copied over to the fixtures directory known to the unit-test at runtime. * An issue where numerous Dart files could be given to the kernel snapshotter has been addressed. It was anticipated that such a (legal) invocation to the kernel snapshotter would produce a snapshot with the contents of all the Dart files added to the root library. This is incorrect and the behavior in this case is undefined. * Dart files referenced by the main Dart file are correctly tracked via a depfile. * The snapshotter arguments have been cleaned up to get rid of unused arguments (`—strong`) and the use of the VM product mode argument has been corrected to no longer depend on the Flutter product mode.
cc @rmacnak-google who helped audit the snapshotter arguments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
testing/testing.gni
Outdated
# | ||
# Arguments: | ||
# | ||
# fixtures (required): The list of test fixtures. An empty list may be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why we must provide an empty list []
? For example, is
test_fixtures("runtime_fixtures") {
dart_main = "fixtures/runtime_test.dart"
fixtures = []
}
a little unnecessarily verbose and confusing than
test_fixtures("runtime_fixtures") {
dart_main = "fixtures/runtime_test.dart"
}
?
If there's a nice reason to put an empty list here, maybe it's worth to write down that reason in this documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason for the empty list is a GN quirk where if the template expansion does not need any arguments (as it is in this case where the target_gen_dir
used to compute the fixtures directory), the invoker
scope goes unused in the expansion and GN warns of this and errors out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can have either one or both the arguments in the template and it will work fine. If you have none, then you'll see the unused invoker scope error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, thanks! It would be nice to add You can have either one or both the arguments in the template and it will work fine. If you have none, then you'll see the unused invoker scope error.
to the comment so in a few months for now, I can still figure this out by reading the comments instead of git blame
😄
testing/testing.gni
Outdated
# | ||
# Arguments: | ||
# | ||
# fixtures (required): The list of test fixtures. An empty list may be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, thanks! It would be nice to add You can have either one or both the arguments in the template and it will work fine. If you have none, then you'll see the unused invoker scope error.
to the comment so in a few months for now, I can still figure this out by reading the comments instead of git blame
😄
flutter/engine@8dc3a4c...4c4c0f8 git log 8dc3a4c..4c4c0f8 --no-merges --oneline 4c4c0f8 Add plugin shim to facilitate old plugins in new embedding (#33478). (flutter/engine#9120) e8c2b17 Added support for transparent FlutterActivitys (#32740). (flutter/engine#9115) 19c5029 Roll src/third_party/skia 29e013deb476..1013ecfb3421 (3 commits) (flutter/engine#9130) 45d39e1 Revert "Roll src/third_party/dart fee615c5a5..d5405d06f4 (21 commits) (#9127)" (flutter/engine#9135) 44f1b44 Revert "Use track-widget-creation transformer included in the sdk. (#9085)" (flutter/engine#9134) ae14c5a Roll src/third_party/dart fee615c5a5..d5405d06f4 (21 commits) (flutter/engine#9127) 3ea7ac8 Roll src/third_party/skia 633db4db7672..29e013deb476 (3 commits) (flutter/engine#9128) 8ad0e2f Roll src/third_party/skia 25b63f91b3b4..633db4db7672 (4 commits) (flutter/engine#9125) 37e6e0c Roll src/third_party/skia 8f88b2da05d5..25b63f91b3b4 (2 commits) (flutter/engine#9121) 37b367e Allow specifying both Dart and non-Dart fixtures in engine unit-tests. (flutter/engine#9113) 28f2c05 Roll src/third_party/skia 1f02e8488551..8f88b2da05d5 (3 commits) (flutter/engine#9116) 0932008 Remove outdated TODOs (flutter/engine#9114) c880ca2 Roll src/third_party/dart 50b0d85804..fee615c5a5 (4 commits) 6e51513 Removing unused imports (flutter/engine#9108) 9ee2697 Roll src/third_party/skia d04aaa3a841a..1f02e8488551 (8 commits) (flutter/engine#9109) fa2e2d9 Add checks to constructors and add missing constructor members (flutter/engine#9106) 7e1788a Fix unopt variants of profile and release builds. (flutter/engine#9107) 867120c Better help message. (flutter/engine#9097) e27c6e8 Forward custom IDE flags to GN. (flutter/engine#9023) 6b4ca8d Roll src/third_party/skia 176b214f91bc..d04aaa3a841a (7 commits) (flutter/engine#9105) a207318 Roll src/third_party/dart ec4d48e241..50b0d85804 (87 commits) 0a6aeb3 Roll src/third_party/skia 213aa46af167..176b214f91bc (2 commits) (flutter/engine#9100) f2e22aa Roll src/third_party/skia 7730d7cb8fb2..213aa46af167 (3 commits) (flutter/engine#9098) 557db42 Roll src/third_party/skia de7e074e8190..7730d7cb8fb2 (2 commits) (flutter/engine#9096) 64a4a0e Roll src/third_party/skia f06b6d5469a5..de7e074e8190 (1 commits) (flutter/engine#9094) fdee625 Roll src/third_party/skia 7e5a64f517e4..f06b6d5469a5 (2 commits) (flutter/engine#9093) daf47f0 Roll src/third_party/skia dc01a84ae098..7e5a64f517e4 (1 commits) (flutter/engine#9092) 41e10f0 Fix internal break since listing contents can return null (flutter/engine#9078) cf1b203 Roll src/third_party/skia f33c95cd6f55..dc01a84ae098 (3 commits) (flutter/engine#9091) 2404cdc Rename macOS FLEPlugin* to FlutterPlugin* (flutter/engine#9074) 509a43f Apply minor cleanups to Android embedding (flutter/engine#9088) 0a0f330 Removed outdated deprecation comments (flutter/engine#9087) a44cbbf Delete BSDiff sources (flutter/engine#9086) 0f1ff3b Correct typos, adopt US spellings (flutter/engine#9081) 651c904 Use track-widget-creation transformer included in the sdk. (flutter/engine#9085) cfa524f New Plugin API PR4: Adds Lifecycle support to the new plugin system. (flutter/engine#9049) 6b8ac18 Roll src/third_party/skia d9430297e74a..f33c95cd6f55 (5 commits) (flutter/engine#9082) 11408ef Update macOS podspec version requirement (flutter/engine#9077) 66c6ae4 Roll src/third_party/skia a4b837971c4b..d9430297e74a (30 commits) (flutter/engine#9080) 9151b37 Roll src/third_party/skia 9339a8a61af0..a4b837971c4b (34 commits) (flutter/engine#9076) ee6a9c4 Fix unchecked operation warnings in FlutterMain (flutter/engine#9073) 333042c Roll third_party/dart/tools/sdks to 2.3.0 (flutter/engine#9072) 01b8c07 Roll src/third_party/skia f77dbd04b926..9339a8a61af0 (12 commits) (flutter/engine#9065) 26b4fb5 Roll src/third_party/dart e3edfd36b2..ec4d48e241 (7 commits) 9d2d58a Add mouse button support to the macOS shell (flutter/engine#9054) ...
flutter#9113) * Allow specifying both Dart and non-Dart fixtures in engine unittests. This fixes numerous issues in the way in which fixtures were managed in the engine unit-tests. * Instead of only being able to specify Dart fixtures, unit-tests may specify non-Dart fixtures as well. These are simply copied over to the fixtures directory known to the unit-test at runtime. * An issue where numerous Dart files could be given to the kernel snapshotter has been addressed. It was anticipated that such a (legal) invocation to the kernel snapshotter would produce a snapshot with the contents of all the Dart files added to the root library. This is incorrect and the behavior in this case is undefined. * Dart files referenced by the main Dart file are correctly tracked via a depfile. * The snapshotter arguments have been cleaned up to get rid of unused arguments (`—strong`) and the use of the VM product mode argument has been corrected to no longer depend on the Flutter product mode.
flutter/engine@8dc3a4c...4c4c0f8 git log 8dc3a4c..4c4c0f8 --no-merges --oneline 4c4c0f8 Add plugin shim to facilitate old plugins in new embedding (flutter#33478). (flutter/engine#9120) e8c2b17 Added support for transparent FlutterActivitys (flutter#32740). (flutter/engine#9115) 19c5029 Roll src/third_party/skia 29e013deb476..1013ecfb3421 (3 commits) (flutter/engine#9130) 45d39e1 Revert &flutter#34;Roll src/third_party/dart fee615c5a5..d5405d06f4 (21 commits) (flutter#9127)&flutter#34; (flutter/engine#9135) 44f1b44 Revert &flutter#34;Use track-widget-creation transformer included in the sdk. (flutter#9085)&flutter#34; (flutter/engine#9134) ae14c5a Roll src/third_party/dart fee615c5a5..d5405d06f4 (21 commits) (flutter/engine#9127) 3ea7ac8 Roll src/third_party/skia 633db4db7672..29e013deb476 (3 commits) (flutter/engine#9128) 8ad0e2f Roll src/third_party/skia 25b63f91b3b4..633db4db7672 (4 commits) (flutter/engine#9125) 37e6e0c Roll src/third_party/skia 8f88b2da05d5..25b63f91b3b4 (2 commits) (flutter/engine#9121) 37b367e Allow specifying both Dart and non-Dart fixtures in engine unit-tests. (flutter/engine#9113) 28f2c05 Roll src/third_party/skia 1f02e8488551..8f88b2da05d5 (3 commits) (flutter/engine#9116) 0932008 Remove outdated TODOs (flutter/engine#9114) c880ca2 Roll src/third_party/dart 50b0d85804..fee615c5a5 (4 commits) 6e51513 Removing unused imports (flutter/engine#9108) 9ee2697 Roll src/third_party/skia d04aaa3a841a..1f02e8488551 (8 commits) (flutter/engine#9109) fa2e2d9 Add checks to constructors and add missing constructor members (flutter/engine#9106) 7e1788a Fix unopt variants of profile and release builds. (flutter/engine#9107) 867120c Better help message. (flutter/engine#9097) e27c6e8 Forward custom IDE flags to GN. (flutter/engine#9023) 6b4ca8d Roll src/third_party/skia 176b214f91bc..d04aaa3a841a (7 commits) (flutter/engine#9105) a207318 Roll src/third_party/dart ec4d48e241..50b0d85804 (87 commits) 0a6aeb3 Roll src/third_party/skia 213aa46af167..176b214f91bc (2 commits) (flutter/engine#9100) f2e22aa Roll src/third_party/skia 7730d7cb8fb2..213aa46af167 (3 commits) (flutter/engine#9098) 557db42 Roll src/third_party/skia de7e074e8190..7730d7cb8fb2 (2 commits) (flutter/engine#9096) 64a4a0e Roll src/third_party/skia f06b6d5469a5..de7e074e8190 (1 commits) (flutter/engine#9094) fdee625 Roll src/third_party/skia 7e5a64f517e4..f06b6d5469a5 (2 commits) (flutter/engine#9093) daf47f0 Roll src/third_party/skia dc01a84ae098..7e5a64f517e4 (1 commits) (flutter/engine#9092) 41e10f0 Fix internal break since listing contents can return null (flutter/engine#9078) cf1b203 Roll src/third_party/skia f33c95cd6f55..dc01a84ae098 (3 commits) (flutter/engine#9091) 2404cdc Rename macOS FLEPlugin* to FlutterPlugin* (flutter/engine#9074) 509a43f Apply minor cleanups to Android embedding (flutter/engine#9088) 0a0f330 Removed outdated deprecation comments (flutter/engine#9087) a44cbbf Delete BSDiff sources (flutter/engine#9086) 0f1ff3b Correct typos, adopt US spellings (flutter/engine#9081) 651c904 Use track-widget-creation transformer included in the sdk. (flutter/engine#9085) cfa524f New Plugin API PR4: Adds Lifecycle support to the new plugin system. (flutter/engine#9049) 6b8ac18 Roll src/third_party/skia d9430297e74a..f33c95cd6f55 (5 commits) (flutter/engine#9082) 11408ef Update macOS podspec version requirement (flutter/engine#9077) 66c6ae4 Roll src/third_party/skia a4b837971c4b..d9430297e74a (30 commits) (flutter/engine#9080) 9151b37 Roll src/third_party/skia 9339a8a61af0..a4b837971c4b (34 commits) (flutter/engine#9076) ee6a9c4 Fix unchecked operation warnings in FlutterMain (flutter/engine#9073) 333042c Roll third_party/dart/tools/sdks to 2.3.0 (flutter/engine#9072) 01b8c07 Roll src/third_party/skia f77dbd04b926..9339a8a61af0 (12 commits) (flutter/engine#9065) 26b4fb5 Roll src/third_party/dart e3edfd36b2..ec4d48e241 (7 commits) 9d2d58a Add mouse button support to the macOS shell (flutter/engine#9054) ...
This fixes numerous issues in the way in which fixtures were managed
in the engine unit-tests.
non-Dart fixtures as well. These are simply copied over to the fixtures
directory known to the unit-test at runtime.
has been addressed. It was anticipated that such a (legal) invocation to the
kernel snapshotter would produce a snapshot with the contents of all the Dart
files added to the root library. This is incorrect and the behavior in this
case is undefined.
depfile.
arguments (
—strong
) and the use of the VM product mode argument has beencorrected to no longer depend on the Flutter product mode.