dart-sdk/runtime/tools
Daco Harkes 9f96aeda6f [test/ffi] Add C++ unit tests for all target ABIs
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>
2020-11-16 16:10:55 +00:00
..
dartfuzz Remove bytecode modes from DartFuzz 2020-10-15 19:01:37 +00:00
ffi [vm/ffi] Remove documentation from setters 2020-05-21 09:18:10 +00:00
graphexplorer Miscellaneous documentation updates. 2019-12-13 23:10:55 +00:00
wiki [runtime/docs] Add custom lexer for shell sessions in runtime wiki. 2020-02-04 09:16:52 +00:00
.gitignore
android_finder.py Mass format python with yapf 2019-08-05 20:34:31 +00:00
benchmark.py [build] Use separate out directories for each sanitizer. 2019-12-11 18:12:47 +00:00
bin_to_assembly.py [build]: Build on Arch Linux with python 2.7-3.8 2019-11-10 21:09:58 +00:00
bin_to_coff.py Revert "[vm, snapshot] Use data image pages for kFull snapshots." 2019-09-10 23:52:52 +00:00
bmu_benchmark_gallery.sh
compiler_layering_check.py Add embedder/vm layer checks to presubmits. 2019-09-30 16:28:07 +00:00
create_archive.py [build]: Build on Arch Linux with python 2.7-3.8 2019-11-10 21:09:58 +00:00
create_snapshot_bin.py [vm] Remove (unused & deprecated) --package-root parameter from VM binaries and from tests (Platform.packageRoot always returns null) 2020-06-24 18:17:53 +00:00
create_snapshot_file.py Mass format python with yapf 2019-08-05 20:34:31 +00:00
create_string_literal.py [build]: Build on Arch Linux with python 2.7-3.8 2019-11-10 21:09:58 +00:00
embedder_layering_check.py [test/ffi] Add C++ unit tests for all target ABIs 2020-11-16 16:10:55 +00:00
gen_library_src_paths.py [build]: Build on Arch Linux with python 2.7-3.8 2019-11-10 21:09:58 +00:00
run_clang_tidy.dart [vm] DBC is obsolete. Remove dead code. 2019-10-27 18:18:29 +00:00
utils.py [build] Use separate out directories for each sanitizer. 2019-12-11 18:12:47 +00:00
valgrind.py Mass format python with yapf 2019-08-05 20:34:31 +00:00
verbose_gc_to_bmu.dart Opt the verbose_gc_to_bmu tool out of null safety. 2020-10-16 00:18:31 +00:00