45 Commits

Author SHA1 Message Date
Emmanuel Garcia
202c1af268 Implement external view embedder on Android (flutter/engine#19033)
The external view embedder allows to embed Android views in a Flutter app.
2020-06-20 12:51:55 -07:00
Yegor
b457938f23 apply null safety syntax to mobile dart:ui (flutter/engine#18933)
* apply null safety syntax to mobile dart:ui
2020-06-12 12:42:12 -07:00
liyuqian
b58ef5144e Add ui_benchmarks (flutter/engine#18945) 2020-06-11 10:55:03 -07:00
xster
410947a88e Make the testing process on different platforms more consistent (flutter/engine#18660) 2020-05-29 18:11:26 -07:00
xster
70a4de6878 Let run_tests.py just stream output (flutter/engine#18534) 2020-05-20 21:38:37 -07:00
Robert Ancell
10cf694c5a Add first Linux shell tests (flutter/engine#18159) 2020-05-06 15:33:11 +12:00
Emmanuel Garcia
f6c5bdea96 Add initial unit tests for the android embedding (flutter/engine#17921) 2020-04-26 20:45:28 -07:00
Gary Qian
887c1a875e PlatformResolvedLocale localization message channel (flutter/engine#17755) 2020-04-21 15:34:44 -07:00
stuartmorgan
7b222c8310 Remove JSON codec from C++ client wrapper (flutter/engine#17312)
The JSON codec is awkward to use in the wrapper (since the client has to build and link one of the JSON libraries to do so). Since it would be very cumbersome to wrap in a C API, and there's essentially no reason to use it instead of the standard codec, this removes it from the wrapper entirely.

Since some system channels (internal to the engine) still use it, it's moved into common/cpp instead of being eliminated entirely. Internally we always use RapidJSON though, so the jsoncpp implementation is removed. Also adds some unit test coverage, since there wasn't any.

Fixes #30669
2020-04-02 14:57:46 -07:00
liyuqian
474e90ba76 Add build_and_test_linux_release presubmit test (flutter/engine#17073) 2020-04-01 18:46:04 -07:00
stuartmorgan
8c89674d93 Allow relative resource paths in GLFW embedding (flutter/engine#16944)
Currently every Linux runner has this code to allow relative resource paths; this moves it into the framework so that any embedder can get this behavior without that code needing to be in the template.

Rolls buildroot to pick up std::filesystem support in our libc++
2020-03-17 19:04:18 -07:00
Dan Field
fd0cc9a285 Teach frontend compiler to replace toString with super.toString for selected packages (flutter/engine#17068)
Adds annotation `keepToString` to opt out.
2020-03-17 15:40:09 -07:00
Emmanuel Garcia
257b799767 Migrate embedding to AndroidX (flutter/engine#17075) 2020-03-13 21:19:24 -07:00
Chinmay Garde
0a9ea0d319 Make output of run_tests.py easier to understand. (flutter/engine#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
Chinmay Garde
c9f71542d1 Disable GPUThreadMerger tests inline instead of via harness flags. (flutter/engine#15706) 2020-01-16 17:11:54 -08:00
Dan Field
1a91d5fb85 const finder (flutter/engine#15668) 2020-01-16 17:01:20 -08:00
Chinmay Garde
8c735c8123 Disable fml_unittests till flakes are addressed. (flutter/engine#15676) 2020-01-15 12:04:36 -08:00
Dan Field
a0b01fb79e Font subset (flutter/engine#14828) 2020-01-07 07:48:15 -08:00
Jim Graham
df3a909cfd Show test output when engine unit test fails. (flutter/engine#14026) 2019-11-26 22:05:43 -08:00
Chinmay Garde
2866095b58 Setup a Metal test surface and add a new unit-test target that tests the testing utilities.
`//flutter/testing` now contains a lot of utilities used by other test targets.
This includes stuff like working with render targets that use either OpenGL or
Metal, fixtures for interacting with the Dart VM, test assertion predicates,
etc.. However, these utilities themselves are not tested as part of a standalone
test suite. Instead, only the test targets that include it exercise these
utilities. Since these are no longer trivial, a new test target has been added
that tests the testing utilities directly.
2019-11-22 23:03:34 -08:00
Alexander Markov
01365aaf02 Cleanup obsolete --strong option of front-end server (flutter/engine#13735) 2019-11-07 13:34:55 -08:00
gaaclarke
f2c70b20b4 Disabled GPUThreadMerger tests. (flutter/engine#13480)
* Disabled GPUThreadMerger tests.

* switched to a single gtest_filter argument
2019-11-01 15:20:45 -07:00
Dan Field
267c681b19 Print the output (flutter/engine#13479) 2019-11-01 14:45:17 -07:00
Dan Field
e471c4732f use check_output instead of check_call so that exceptions show the output. (flutter/engine#13478) 2019-11-01 11:17:15 -07:00
chunhtai
29b3675e23 Reland "fix fml_unittes is not run during presubmit (#13395)" (flutter/engine#13426) 2019-10-31 13:50:19 -07:00
chunhtai
fac3f076eb Revert "fix fml_unittes is not run during presubmit (#13395)" (flutter/engine#13425)
This reverts commit e92c42f0aa4c481010e6e24106c19cd19a35754b.
2019-10-29 16:36:43 -07:00
chunhtai
e92c42f0aa fix fml_unittes is not run during presubmit (flutter/engine#13395) 2019-10-29 15:31:25 -07:00
George Wright
f99f00b0e3 Make flutter_tester support multithreaded testing, and run all Dart tests in both single and multithreaded configurations (flutter/engine#13273)
Make flutter_tester support multithreaded testing, and run all Dart tests in both single and multithreaded configurations

This also modifies Shell::GetUIIsolateLastError() and Shell::EngineHasLivePorts() so that they must be called from the UI task runner.
2019-10-22 14:10:57 -07:00
Chinmay Garde
5b8089a3cc Use the fixtures mechanism for txt unit-tests and benchmarks. (flutter/engine#13180)
These tests and benchmarks can now be run without needing additional flags on the command line.
2019-10-16 16:29:55 -07:00
chunhtai
79ad29854f add windows embedding test (flutter/engine#12423) 2019-10-03 12:42:44 -07:00
Chinmay Garde
7dda245874 Shuffle test order and repeat test runs once. (flutter/engine#12275)
The tests we write must be resilient to the order in which they are run in the
harness. That is, they must not rely on global state set by other tests that
have already run in the process. Also, these tests must themselves be
repeatable. That is, they must correctly clean up after themselves and be able
to run successfully again in the same process.

This patch adds some safeguards against (but does NOT guarantee) the addition of
tests that violate the dictum.

Additionally, test failures must be easily reproducible for folks investigating
the test failure. Also, tests that assert correctness of unrelated code must not
stop progress on the authors patch.

This changes does not hinder reproducibility of test failures because the random
seed is printed in the logs before running each test. Developers attempting to
reproduce the failure locally can do the same via the following invocation
`--gtest_shuffle --gtest_repeat=<the count> --gtest_random_seed=<seed from failing run>`.

This change does introduce potential burden on patch authors that may see
failures in unrelated code as a newly failing shuffle seed is used on their
runs. To ameliorate this, we will formulate guidance for them to aggressively
mark such tests as disabled and file bugs to enable the same.

The test seed is intentionally kept low because it’s purpose is to test that
individual tests are repeatable. It must not be used as a replacement for
fuzzing.
2019-09-17 14:50:51 -07:00
xster
575ad9c7b3 Let java unit tests build with autoninja (flutter/engine#11799) 2019-08-30 20:10:29 -07:00
Michael Klimushyn
c65fb9cdc1 Assert that the JUnit tests are running on Java 8 (flutter/engine#11466) 2019-08-27 10:38:52 -07:00
Michael Klimushyn
ca63162ed9 Minor update to the Robolectric test harness (flutter/engine#11067)
Make sure that any `android.util.Log`s during the tests are reported to
stdout.
2019-08-16 16:25:59 -07:00
liyuqian
3a94682272 Hide verbose dart snapshot during run_test.py (flutter/engine#11040)
Without this change, a single dart test will print out 306 lines.
With this change, a single dart test will only print out 33 lines.
This helps a lot in local tests.

In order to return to the old logging, set `--verbose-dart-snapshot` flag.
2019-08-15 16:40:30 -07:00
Michael Klimushyn
7f6d60a1b4 Report JUnit test failures (flutter/engine#10941)
Previously this script was not reporting any JUNit failures and somehow
ended up included a non-existent jar for Java tests to test against.

It looks like one of the JUnit tests is now failing. Disabling it for
now to turn on CI again as soon as possible, will fix and enable it in a
follow up.
2019-08-12 12:17:15 -07:00
Dan Field
ea073bcba4 Specify which android variant for tests (flutter/engine#10717) 2019-08-08 16:16:51 -07:00
liyuqian
cff01c0265 Revert "Remove semi-redundant try-jobs. (#10485)" (flutter/engine#10705)
This reverts commit 365251a0149d6a82894d3798604694369018916e.

Our infra should be capable to run all those deleted tests as now we've throttled the Fuchsia auto-rollers.

The current throttle is 1 PR / 3 hours for the 4 rollers:
- https://cs.corp.google.com/skia/buildbot/autoroll/config/fuchsia-mac-toolchain-flutter-engine.json?l=53
- https://cs.corp.google.com/skia/buildbot/autoroll/config/fuchsia-mac-sdk-flutter-engine.json?g=0&l=53
- https://cs.corp.google.com/skia/buildbot/autoroll/config/fuchsia-linux-toolchain-flutter-engine.json?g=0&l=56
- https://cs.corp.google.com/skia/buildbot/autoroll/config/fuchsia-linux-sdk-flutter-engine.json?g=0&l=56

We're changing them to 1 PR / 12 hours: http://skbug.com/9322
2019-08-07 16:21:41 -07:00
Dan Field
993c8e1bb1 Test perf overlay gold on Linux (flutter/engine#10703) 2019-08-07 13:47:00 -07:00
Shi-Hao Hong
c5a2f30915 Rolls engine to Android SDK 29 and its corresponding tools (flutter/engine#10692)
* Rolls engine to Android SDK 29 and its corresponding tools

* Update from android-28 to android-29 in relevant files

* Roll buildroot to tip of tree
2019-08-07 12:34:33 -04:00
Chinmay Garde
365251a014 Remove semi-redundant try-jobs. (flutter/engine#10485)
We are severely resource constrained on the tryjobs. This is hindering progress on ToT due to scheduling failures and rate limits. There are no plans to requisition more resources in this infra scheme as the migration to tryjobs on LUCI is the preferred way forward. This patch removes presubmits that are somewhat redundant. Each removed presubmit and the justification is given below:

* `build_and_test_linux_opt_release`: The AOT variant is tested by `build_and_test_linux_opt_profile` (actually its replacement, see the next point).
* `build_and_test_linux_opt_profile`: When we build the host profile variant for Android, we test it as well instead of building the extra variant (since we already need a host for a target build).
* `build_and_test_android_unopt_debug`: `gen_javadoc` have been moved to the profile variant. `Roboelectric` tests have been moved to profile variant. JIT infra will be tested by the the host tests.
* ToT framework checks: These will be performed (by the autoroller)[https://autoroll.skia.org/r/flutter-engine-flutter-autoroll?tab=status] which also has a sheriff rotation. This will also avoid us having to ignore red presubmits on manual changes.

Everything else is left as-is. To be clear, this causes strictly less checks to be performed on each commit.
2019-08-06 16:16:06 -07:00
Michael Klimushyn
603d401fc2 Add working Robolectric tests (flutter/engine#9954)
`gclient sync` now grabs Robolectric, JUnit, and their transitive
runtime dependencies. They're being stored in a new CIPD package,
`flutter/android/robolectric_bundle`.

`shell/platform/android/BUILD.gn` has a new target for building the
tests, `robolectric_tests`. `testing/run_tests.py` has been extended to
build and run the new target. Runs the android tests under
"build_and_test_android" on CI.

This also adds some very simple sample tests to start with and a README
to the java tests directory.
2019-07-23 09:06:19 -07:00
Jason Simmons
2edaa8c49f Updates to the engine test runner script (flutter/engine#9934)
* Use separate filters for engine executables and Dart test scripts
* Do not run the benchmarks on Cirrus
2019-07-19 17:00:18 -07:00
Chinmay Garde
9e2a61b90c Selectively enable tests that work on Windows and file issues for ones that don't. (flutter/engine#9852)
This is in preparation for the  tryjobs to run these tests. The LUCI harness will also be updated so that the tests to run are specified in the repo instead of the recipe.
2019-07-16 13:30:57 -07:00
Chinmay Garde
3b5b7b2fc3 Convert run_tests to python, allow running on Mac/Windows and allow filters for tests. (flutter/engine#9818)
Sample usage:

To run only the embedder_unittests in the engine with the profile variant, the command would be
```
./flutter/testing/run_tests.py --variant host_profile_unopt --type engine --filter embedder_unittests
``

To run only the geometry in Dart with the debug variant, the command would be
```
./flutter/testing/run_tests.py --variant host_debug_unopt --type dart --filter geometry_test
``

Without any argument, the behavior is identical to `run_tests.sh`.

In a subsequent patch, I will enable running unit-tests on Windows in the tryjobs. The lack of compatibility of the shell script on Windows made it so that we never ran any Windows unit-tests in the tryjobs.
2019-07-15 17:46:36 -07:00