mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 08:20:31 +00:00
9f96aeda6f
This CL introduces unit tests for the Native* classes in compiler/ffi that can run for all supported target ABIs on any host architecture. The unit tests are compiled for all target ABIs with `tools/build.py run_ffi_unit_tests` and run for all target ABIs with `tools/test.py ffi_unit`. The unit test and tested code do not conceptually depend on having a DartVM. The tests are compiled with a custom `dart::Zone` and `platform/`. This enables compiling for all `TARGET_ARCH_*` and `TARGET_OS_*` on any host, and running unit tests for all target ABIs on any host. Because the `run_ffi_unit_tests` executables do not include the DartVM their build is quick (<10seconds) and they are small (~6MB) when compared to `run_vm_tests` (~250MB). The tests are added to the existing FFI QEMU bot to prevent adding an extra bot which would add checkout overhead. The unit tests themselves are set up to be fairly similar to vm/cc tests. The only difference is the NativeCallingConvention tests which are set up with `.expect` files for easy inspection and updating. TEST=runtime/vm/compiler/ffi/native_calling_convention_test.cc TEST=runtime/vm/compiler/ffi/native_location_test.cc TEST=runtime/vm/compiler/ffi/native_type_test.cc Change-Id: I7b8bf4de9ef070e7546472217e571a60362b9639 Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171725 Commit-Queue: Daco Harkes <dacoharkes@google.com> Reviewed-by: Clement Skau <cskau@google.com> Reviewed-by: Alexander Thomas <athom@google.com> |
||
---|---|---|
.. | ||
dartfuzz | ||
ffi | ||
graphexplorer | ||
wiki | ||
.gitignore | ||
android_finder.py | ||
benchmark.py | ||
bin_to_assembly.py | ||
bin_to_coff.py | ||
bmu_benchmark_gallery.sh | ||
compiler_layering_check.py | ||
create_archive.py | ||
create_snapshot_bin.py | ||
create_snapshot_file.py | ||
create_string_literal.py | ||
embedder_layering_check.py | ||
gen_library_src_paths.py | ||
run_clang_tidy.dart | ||
utils.py | ||
valgrind.py | ||
verbose_gc_to_bmu.dart |