-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[vm/ffi] Add script to extract existing positive ffi tests into bundl…
…e to be used for flutter/flutter integration test The `tests/ffi/prepare_flutter_bundle.dart` script will try to discover all synchronous, positive test from the "ffi" test suite, rewrite them slightly and output a directory which can be used in a flutter/flutter FFI integration test. We split the ffi test functions into two parts, because a subset of the C functions will issue calls to the VM via `dart_api.h`, which is not available for the flutter/flutter integration test. => We make `runtime/bin/ffi_test/ffi_test_functions.cc` a pure C library, usable without `dart_api.h` and move the remaining VM specific code to .../ffi_test_functions_special.cc contains. All tests from `tests/ffi/*_test.dart` will be included in the generated bundle, which * don't use async/isolates * don't rely on VM api * don't rely on DynamicLibrary.{process,executable} * don't take too long to execute The script can be used as follows: sdk % dart tests/ffi/prepare_flutter_bundle.dart foo Using SDK root: .../sdk The following tests will be included: aliasing_test.dart data_not_asan_test.dart data_test.dart extension_methods_test.dart external_typed_data_test.dart function_structs_test.dart negative_function_test.dart regress_37254_test.dart regress_39044_test.dart regress_39063_test.dart regress_39068_test.dart stacktrace_regress_37910_test.dart structs_test.dart variance_function_test.dart The following tests were filtered due to using dart_api.h/async/DynamicLibrary.{process,executable}/... function_callbacks_test.dart function_gc_test.dart function_test.dart object_gc_test.dart regress_37100_test.dart regress_37511_callbacks_test.dart regress_37511_test.dart regress_37780_test.dart Please copy generated files into FFI flutter test application * foo/lib/src/generated * foo/ios/Classes Change-Id: Ia13f97df3bbc90829bb8fde8265a7e1d2c0f8260 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127006 Reviewed-by: Daco Harkes <dacoharkes@google.com> Commit-Queue: Martin Kustermann <kustermann@google.com>
- Loading branch information
1 parent
f9327d3
commit b0155a7
Showing
18 changed files
with
507 additions
and
269 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
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
Oops, something went wrong.