37 Commits

Author SHA1 Message Date
stuartmorgan
08ae3bb63e
Remove JSON codec from C++ client wrapper (#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
a82343befa
Add build_and_test_linux_release presubmit test (#17073) 2020-04-01 18:46:04 -07:00
stuartmorgan
710f738dd6
Allow relative resource paths in GLFW embedding (#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
034f913b98
Teach frontend compiler to replace toString with super.toString for selected packages (#17068)
Adds annotation `keepToString` to opt out.
2020-03-17 15:40:09 -07:00
Emmanuel Garcia
025e2d82dd
Migrate embedding to AndroidX (#17075) 2020-03-13 21:19:24 -07: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
Chinmay Garde
2c64a06d4a
Disable GPUThreadMerger tests inline instead of via harness flags. (#15706) 2020-01-16 17:11:54 -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
abaac56c60
Font subset (#14828) 2020-01-07 07:48:15 -08:00
Jim Graham
18d74fe45b
Show test output when engine unit test fails. (#14026) 2019-11-26 22:05:43 -08:00
Chinmay Garde
ed30d77ab9 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
ddceed5f7a
Cleanup obsolete --strong option of front-end server (#13735) 2019-11-07 13:34:55 -08:00
gaaclarke
1af0e585b3
Disabled GPUThreadMerger tests. (#13480)
* Disabled GPUThreadMerger tests.

* switched to a single gtest_filter argument
2019-11-01 15:20:45 -07:00
Dan Field
21c049e202
Print the output (#13479) 2019-11-01 14:45:17 -07:00
Dan Field
a5243c024c
use check_output instead of check_call so that exceptions show the output. (#13478) 2019-11-01 11:17:15 -07:00
chunhtai
d33b91837e
Reland "fix fml_unittes is not run during presubmit (#13395)" (#13426) 2019-10-31 13:50:19 -07:00
chunhtai
e569294902
Revert "fix fml_unittes is not run during presubmit (#13395)" (#13425)
This reverts commit 4d553cfe1cd7ec235af4f9d3952a974757cda49b.
2019-10-29 16:36:43 -07:00
chunhtai
4d553cfe1c
fix fml_unittes is not run during presubmit (#13395) 2019-10-29 15:31:25 -07:00
George Wright
591d149f97
Make flutter_tester support multithreaded testing, and run all Dart tests in both single and multithreaded configurations (#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
b6858d2092
Use the fixtures mechanism for txt unit-tests and benchmarks. (#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
daf1eb9a6a
add windows embedding test (#12423) 2019-10-03 12:42:44 -07:00
Chinmay Garde
b4d8158316
Shuffle test order and repeat test runs once. (#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
6a0ca8dc78
Let java unit tests build with autoninja (#11799) 2019-08-30 20:10:29 -07:00
Michael Klimushyn
0287144fa3
Assert that the JUnit tests are running on Java 8 (#11466) 2019-08-27 10:38:52 -07:00
Michael Klimushyn
1e1eb4d34a
Minor update to the Robolectric test harness (#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
a7c965caec
Hide verbose dart snapshot during run_test.py (#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
c92a0d992a
Report JUnit test failures (#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
33c53c876b
Specify which android variant for tests (#10717) 2019-08-08 16:16:51 -07:00
liyuqian
620b8998f8
Revert "Remove semi-redundant try-jobs. (#10485)" (#10705)
This reverts commit 16c0058f17403b219a596de993ece5dd7f768b3d.

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
4c406ba976
Test perf overlay gold on Linux (#10703) 2019-08-07 13:47:00 -07:00
Shi-Hao Hong
797f032b7b
Rolls engine to Android SDK 29 and its corresponding tools (#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
16c0058f17
Remove semi-redundant try-jobs. (#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
8ed5da8b65
Add working Robolectric tests (#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
da0fcf8284
Updates to the engine test runner script (#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
9eed783e94
Selectively enable tests that work on Windows and file issues for ones that don't. (#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
a59b6a6e38
Convert run_tests to python, allow running on Mac/Windows and allow filters for tests. (#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