Commit Graph

13 Commits

Author SHA1 Message Date
Jason Simmons 7069025a32 Reformat BUILD.gn files to comply with the format checker presubmit script (#13401) 2019-10-29 09:49:16 -07:00
sjindel-google d9080029af Remove use of the blobs snapshot format from unittests (#12563)
* Remove uses of the "blobs" snapshot format in Engine tests.

* Comments

* Rebasing against updated ELF loader API.
2019-10-10 14:03:42 +02:00
Jonah Williams 6f5eb1332f Add support for JIT release mode (#12446) 2019-09-27 11:20:54 -07:00
Chris Bracken 92c63e848a Ensure trailing newline before EOF in C++ sources (#11489)
In generated text fixture location lookup code:
When the second argument to write_file() is a list, it is written one
item per line to the path specified by the first argument. This ensures
that we emit a trailing newline at EOF to comply with -Wnewline-eof.

Elsewhere:
Lack of a newline at EOF was undefined behaviour prior to C++11. The
Fuchsia tree sets -Wnewline-eof in its buildroot, so we plan to do the
same. This cleans up remaining first-party C++ sources that don't
include a trailing newline.
2019-08-27 00:13:00 -07:00
Chinmay Garde 37b367e4d2 Allow specifying both Dart and non-Dart fixtures in engine unit-tests. (#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.
2019-05-28 19:11:47 -07:00
Chinmay Garde a1a2129bc4 GN Format all files in the engine. (#8369) 2019-03-29 12:44:57 -07:00
Jason Simmons 0ca1d1f318 Remove the Dart JIT snapshot data from AOT builds of the embedder library (#7806)
Also extend the embedder unit tests to cover AOT execution
2019-02-15 09:43:23 -08:00
Chris Bracken 869d9f5285 Support custom kernel blob path in test fixtures (#7525)
Updates the test_fixtures rule to support a custom kernel output file
name. Improves rule documentation.
2019-01-22 11:35:34 -08:00
Chris Bracken 67cd7d4d3b Compile embedder unit test Dart to kernel (#7231)
As of the migration to Dart 2, it has been necessary to compile Dart to
kernel prior to execution. The embedder currently requires that the
resulting kernel file be named `kernel_blob.bin` and be located at the
root of the assets directory passed to the embedder API.

This patch updates the test_fixtures build rule to perform a kernel
compile using frontend_server, outputting `kernel_blob.bin` to
`fixtures/test_target_name` directory, and updates the embedder
unittests to specify the kernel file rather than the Dart source file.

Since the kernel compiler requires a `main()` function to be defined, it
also updates `simple_main.dart` from runtime_unittests to define
`main()` rather than `simple_main()`.

This also updates all existing sub-targets to be testonly.

This relands commit ac9e521a1d, which was
reverted in commit 4941125829. Rather than
running as prebuilt_dart_action, we use dart_action to ensure the
frontend snapshot it compatible with the VM on which it's executed.
2018-12-16 12:23:18 -08:00
Chris Bracken 4941125829 Revert "Compile embedder unit test Dart to kernel (#7227)" (#7230)
This reverts commit ac9e521a1d.

This broke dynamic release mode builds of
//flutter/runtime:runtime_fixtures_kernel (likely all product-mode
builds).
2018-12-15 14:43:26 -08:00
Chris Bracken ac9e521a1d Compile embedder unit test Dart to kernel (#7227)
Compile embedder unit test Dart to kernel

As of the migration to Dart 2, it has been necessary to compile Dart to
kernel prior to execution. The embedder currently requires that the
resulting kernel file be named `kernel_blob.bin` and be located at the
root of the assets directory passed to the embedder API.

This patch updates the test_fixtures build rule to perform a kernel
compile using frontend_server, outputting `kernel_blob.bin` to
`fixtures/test_target_name` directory, and updates the embedder
unittests to specify the kernel file rather than the Dart source file.

Since the kernel compiler requires a `main()` function to be defined, it
also updates `simple_main.dart` from runtime_unittests to define
`main()` rather than `simple_main()`.

This also updates all existing sub-targets to be testonly.
2018-12-15 13:59:58 -08:00
Michael Goderbauer 70a1106b50 Unify copyright lines (#6757) 2018-11-07 12:24:35 -08:00
Chinmay Garde 2d9f6acfac Add a test_fixtures GN rule that allows unittests to reference fixtures. (#4280) 2017-10-25 14:54:20 -07:00