348 Commits

Author SHA1 Message Date
Chinmay Garde
a37560a074
Use the standard [[nodiscard]] attribute instead of an FML macro. (#17100) 2020-03-11 13:36:01 -07:00
Chinmay Garde
7c2d975b55
Gather demangled stack traces and report the same to console on crashes. (#16450)
These should only be used on host binaries for more detailed crash reports.
Installing the handler on targets (iOS/Android) may cause use to break existing
crash reporting mechanisms users may have installed themselves in the process.

This should work on Darwin & Linux for now.

Doing something like int* a = nullptr; *a = 12; or abort or tripping an
assertion should print something the following before program termination. We
can tweak the report further if necessary.

```
[ERROR:flutter/fml/backtrace.cc(110)] Caught signal SIGSEGV during program execution.
Frame 0: 0x10658342c void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*)
Frame 1: 0x106555070 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*)
Frame 2: 0x106554f81 testing::Test::Run()
Frame 3: 0x106555dc3 testing::TestInfo::Run()
Frame 4: 0x1065570a1 testing::TestSuite::Run()
Frame 5: 0x106562a55 testing::internal::UnitTestImpl::RunAllTests()
Frame 6: 0x10658c22c bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*)
Frame 7: 0x1065625c3 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*)
Frame 8: 0x106562445 testing::UnitTest::Run()
Frame 9: 0x105c8dc33 RUN_ALL_TESTS()
Frame 10: 0x105c8dbe6 main
Frame 11: 0x7fff7c2dc3d5 start
```

Known issue: This routines that generate the stack trace are not signal safe.
But since we only use the same before the process is terminating, this ought to
be fine. I’ll work in a separate patch to convert all the internals to be signal
safe. In the meantime, this will help us better identify the causes of flakes on
our bots.

Fixes https://github.com/flutter/flutter/issues/50244
2020-03-10 16:31:06 -07:00
Chinmay Garde
bcefcdb880
Use the ELF loader to setup AOT symbols in benchmark runner. (#17051)
We no longer package AOT artifacts as discrete blobs. The portable ELF loader
from the testing library may be used instead.

Fixes https://github.com/flutter/flutter/issues/52263
2020-03-10 12:28:24 -07:00
Dan Field
4a2273e302
fix OOL def for dart_isolate_runner (#16941) 2020-03-04 13:56:08 -08:00
gaaclarke
bb17df756d
Added compiling the dart code for scenario tests as part of the xcode build (#16937) 2020-03-04 13:36:58 -08:00
Dan Field
b77f509e0b
Refactor isolate test (#16933)
Make the test harness reusable for other tests that want to launch a Dart VM
2020-03-04 11:10:39 -08:00
gaaclarke
59b4d9b3b8
Fixed the ability to scroll to the top on iOS 13 (#16820) 2020-03-04 10:53:11 -08:00
Dan Field
c2fc31d19d
remove usage of Dart_New for paragraph/libtxt (#16837) 2020-02-28 00:15:40 -08:00
Dan Field
888a62cf22
Revert "Enable lazy-async-stacks by-default in all modes (#16556)" (#16781)
This reverts commit fdabcaddf45deaf93a5238c99c2acbeb25a3a027.
2020-02-24 20:04:40 -08:00
George Wright
e5091a8ca2
Enable Vulkan-related shell unittests on Fuchsia (#16718)
Also enable tests that were disabled due to MessageLoop flakiness resolved by https://github.com/flutter/engine/pull/16568
2020-02-21 11:01:16 -08:00
freiling
bc4a27fc2f
[shell tests] Integrate Vulkan with Shell Tests (#16621)
This change creates a test only implementation of flutter::Surface backed by an
offscreen Vulkan GrContext. Much of the code in this test Surface was lifted
from flutter::VulkanWindow which I was unable to use without extricating it
from the VkSurface/VkSwapchain code which we do not want to use in offscreen
tests. I would recommend refactoring VulkanWindow to separate GrContext
creation and VkSwapchain creation in order to promote greater code reuse
between onscreen and offscreen vulkan paths.

This change is excersised thoroughly by the shell tests and was manually
tested against these tests on Fuchsia on Intel.
2020-02-20 11:37:00 -08:00
vsmenon
0ef67b5e74
opt out dart:ui from nnbd (#16473)
* opt out dart:ui from nnbd

* Annotate tests as well
2020-02-20 11:04:00 -08:00
Martin Kustermann
fdabcaddf4
Enable lazy-async-stacks by-default in all modes (#16556)
This was already enabled by-default in AOT mode in [0] - which made the
gen_snapshot invocations use "--lazy-async-stacks --no-causal-async-stacks".

See go/dart-10x-faster-async for more information.

[0] https://github.com/flutter/flutter/commit/347823234fd
2020-02-20 18:31:26 +01:00
Chinmay Garde
1cd1304443
Control test timeouts based on debugger status or command line flags. (#16375) 2020-02-18 15:31:04 -08:00
George Wright
400ed7cebc Revert "[shell tests] Integrate Vulkan with Shell Tests"
This reverts commit 594f6608276cbcb7be2b89defcfb6eef03321fad.
2020-02-14 13:02:38 -08:00
Forrest Reiling
594f660827 [shell tests] Integrate Vulkan with Shell Tests
This change creates a test only implementation of flutter::Surface backed by an
offscreen Vulkan GrContext. Much of the code in this test Surface was lifted
from flutter::VulkanWindow which I was unable to use without extricating it
from the VkSurface/VkSwapchain code which we do not want to use in offscreen
tests. I would recommend refactoring VulkanWindow to separate GrContext
creation and VkSwapchain creation in order to promote greater code reuse
between onscreen and offscreen vulkan paths.

This change is excersised thoroughly by the shell tests and was manually
tested against these tests on Fuchsia on Intel.
2020-02-14 12:56:16 -08:00
George Wright
aece5ad714
Move log_listener call into the reboot trap (#16564) 2020-02-12 15:09:38 -08:00
George Wright
8a6b9498b2
[Fuchsia] Dump syslog output after tests have run (#16561) 2020-02-12 13:12:15 -08:00
Chris Yang
5fb0116d62
iOS platform view gesture blocking policy. (#15940) 2020-02-11 15:34:59 -08:00
Matt Carroll
270421c103
Fix ensureInitializationCompleteAsync callback when already initialized. (#39675) (#16503) 2020-02-11 15:25:58 -08:00
Michael Klimushyn
077918dcfd
Apply Google Java format (#16501)
This shouldn't result in any logical changes. I've done a quick smoke
test by building a local Android engine and running Flutter gallery, no
compile errors or other obvious issues.

Applied by running `/ci/format.sh | patch -p0` with the altered script
added in flutter/engine#16500. I did locally modify the script slightly
further so it would run against all Java files in the repo instead of
just modified ones.
2020-02-07 16:10:46 -08:00
George Wright
964ae1009e
Disable ShellTest.WaitForFirstFrameTimeout on Fuchsia (#16495) 2020-02-07 13:13:59 -08:00
George Wright
d2aab27b4f
Enable shell_unittests on Fuchsia with Vulkan dependencies. (#16376)
This also adds a dependency on SwiftShader's Vulkan frontend.
2020-02-06 15:07:01 -08:00
George Wright
0517627988 Enable runtime_unittests on Fuchsia 2020-02-06 13:52:33 -08:00
George Wright
9ada1b0e08 Fix elf_loader.cc on Fuchsia, add a TODO for proper fix 2020-02-06 13:52:33 -08:00
George Wright
3ac1e6d8b5
Disable unit tests using --gtest-filter instead of at compile time (#16472) 2020-02-06 13:01:14 -08:00
Felipe Archondo
11b770489f
[fuchsia] Migrate flutter runner to use Present2 (#14162)
No change in behavior expected. We have 2 frames in flight as before. By switching to Present2 and specifying a kMaxFramesInFlight however, we allow us greater flexibility to change how Flutter schedules its frames.

This change also adds tests for SessionConnection and VsyncRecorder.
2020-02-05 13:51:04 -08:00
George Wright
4cda916d5f
Expose the dart kernel snapshot target and copied assets as a public dependency (#16266)
This allows for targets to depend on the assets generated by the test_fixtures target.
2020-02-04 12:30:48 -08:00
Chinmay Garde
7ca44d339b
Kill the test harness if any test exceeds a timeout. (#16349)
Our tests depend on explicit latching to verify assertion are checked. If a test
does not respond for a long time, it has probably encoutered a deadlock. Instead
of waiting for the test runner to detect this, apply a very aggresive timeout on
a per test basis.
2020-02-04 11:22:13 -08:00
Dan Field
3c19ecaaf2
use echo to test whether host is up (#16322) 2020-01-31 23:46:57 -08:00
Chinmay Garde
f7b78e001d
Remove all uses of the redundant flutter_root variable. (#16311)
This was only necessary when the Engine had to build in multiple buildroots
where the sources where checked out at different paths relative to the
buildroot. This is no longer the case and there are already cases GN rules
have been written that mix and match variable usage with the direct
specification of the path to the Flutter sources relative to the sole buildroot.
2020-01-31 21:49:48 -08:00
Chinmay Garde
dffe3fb276
Isolate and move common portable ELF loading from fixtures into //flutter/testing. (#16305)
Also update all known test harnesses to use this and fixes the broken shell_unittests harness.

Fixes https://github.com/flutter/flutter/issues/49853
2020-01-31 12:52:00 -08:00
Chinmay Garde
fc1936fb3c
Make output of run_tests.py easier to understand. (#16229)
* The outputs of all commands are not printed and not just commands that fail.
* The stdout and stderr are now printed in order.
* Clear dividers mark logs from specific subprocesses or errors.
* The test whose run failed should now be exactly on top of the error message and code.
2020-01-29 20:47:35 -08:00
Gary Qian
ee297aa699
Reland "Engine/LibTxt/dart:ui impl of TextHeightBehavior #15087" (#16155) 2020-01-29 10:52:24 -08:00
Dan Field
53baa7aee5
Revert breaking PRs (#16148)
* Revert "Web PargraphStyle TextHeightBehavior integration (#16075)"

This reverts commit 86682a2d09e7d111a5c4fd2156b9971bd65fb693.

* Revert "Engine/LibTxt/dart:ui impl of TextHeightBehavior (#15087)"

This reverts commit cbf4536d158e25e372469c242e326c48cc730de7.
2020-01-28 10:40:05 -08:00
Gary Qian
cbf4536d15
Engine/LibTxt/dart:ui impl of TextHeightBehavior (#15087) 2020-01-27 13:37:11 -08:00
Chinmay Garde
276481c4d3
Move tonic into //flutter/third_party. (#15895)
Tonic used to be used by multiple consumers outside of Flutter Engine. Due to
this, it has an unnecessary abstraction layer as well as utilities duplicated in
FML and other engine subsystems. The sole user of Tonic is now the Flutter
Engine. It is intended that the Flutter Engine team now owns this subsystem,
remove unnecessary utilities and document the headers. This is the first step in
the transition. No history is being imported as the initial history was already
lost in the transition of this component to fuchsia.googlesource. As this
component was unmaintained there, I could see no additional value in importing
the history of the patches there.

No functional change. Just moved the repo from //third_party to
//flutter/third_party and updates GN refs.
2020-01-25 17:01:56 -08:00
George Wright
ede50d43d3
Ensure GetFixturesPath works on Fuchsia (#15978) 2020-01-24 15:47:29 -08:00
Dan Field
89f3471fa7
the the fix (#15973) 2020-01-24 12:43:32 -08:00
Brian Osman
14fefe31ce
Implement new SkCanvas virtuals in testing canvases (#15893) 2020-01-22 15:52:46 -05:00
godofredoc
d5dcb21518
Add .vpython dependencies to migrate run_tests.py to vpython. (#15161)
vpython is used to provide a hermetic environment for python scripts.
Dependencies are provided using cipd and take advantage of the caching
tools provided by luci services.
2020-01-21 11:16:59 -08:00
Chinmay Garde
2c64a06d4a
Disable GPUThreadMerger tests inline instead of via harness flags. (#15706) 2020-01-16 17:11:54 -08:00
Dan Field
1970c0624d
implicit casts and add missing docs (#15698) 2020-01-16 17:03:33 -08:00
chunhtai
1f4c593032 loadfontfromlist should send fontchange message to framework (#14805) 2020-01-16 17:03:04 -08:00
Dan Field
8df1757d35
const finder (#15668) 2020-01-16 17:01:20 -08:00
Chinmay Garde
bbdafe0968
Disable fml_unittests till flakes are addressed. (#15676) 2020-01-15 12:04:36 -08:00
Dan Field
a48ac35f0c
try 10 times (#15653) 2020-01-14 17:58:07 -08:00
LongCatIsLooong
3339c42e28
Reland "Bump simulator version in IosUnitTests & scenario app in preparation for luci xcode 11 migration (#15316)", Reverted in #15313
This reverts commit 8ed688f7d5dce604e05133504927ce2d5c45b396.
2020-01-08 12:06:15 -08:00
LongCatIsLooong
8ed688f7d5
Revert "Bump simulator version in IosUnitTests & scenario app in preparation for luci xcode 11 migration (#15154)" (#15313)
This reverts commit 3a9121b923b83299235d34c62e263b1b8cfe0098.
2020-01-08 10:43:32 -08:00
LongCatIsLooong
3a9121b923
Bump simulator version in IosUnitTests & scenario app in preparation for luci xcode 11 migration (#15154) 2020-01-08 10:05:56 -08:00