1. 07 8月, 2019 1 次提交
    • C
      Allow embedders to control Dart VM lifecycle on engine shutdown. (#10652) · b769353c
      Chinmay Garde 提交于
      This exposes the `Settings::leak_vm` flag to custom embedders. All embedder
      unit-tests now shut down the VM on the shutdown of the last engine in the
      process. The mechanics of VM shutdown are already tested in the Shell unit-tests
      harness in the DartLifecycleUnittests set of of assertions. This just exposes
      that functionality to custom embedders. Since it is part of the public stable
      API, I also switched the name of the field to be something less snarky than the
      field in private shell settings.
      b769353c
  2. 17 7月, 2019 1 次提交
  3. 07 7月, 2019 1 次提交
  4. 04 7月, 2019 1 次提交
  5. 18 6月, 2019 1 次提交
  6. 13 6月, 2019 1 次提交
    • C
      Wire up Swiftshader based OpenGL ES unit-tests on hosts. (#9264) · 7bb5b9ae
      Chinmay Garde 提交于
      Currently, all our host unit-tests that have rendering concerns use the software backend because of OpenGL ES availability and stability issues on the various platforms where we run host tests. Unfortunately, entire subsystems are disabled (and not tested) when rendering with the software backend. This patch pulls in SwiftShader and via pending patches in the buildroot, configures the host unit-tests to optionally use OpenGL ES in a stable manner without relying on the OpenGL drivers being present (and functional).
      
      I have wired up the embedder test fixture in this patch to use the SwiftShader based OpenGL ES driver. I will update the shell and runtime unittests in a subsequent patch as well. The on and offscreen surfaces are configured as 1x1 pbuffer surface because we should be able to write pixel tests using OpenGL directly wihout having to deal with surfaces.
      7bb5b9ae
  7. 26 5月, 2019 1 次提交
  8. 10 4月, 2019 1 次提交
  9. 29 3月, 2019 1 次提交
  10. 28 3月, 2019 2 次提交
  11. 27 3月, 2019 3 次提交
  12. 26 3月, 2019 2 次提交
    • C
      Migrate existing embedder unit tests to use the fixture. (#8296) · 22ee8ee0
      Chinmay Garde 提交于
      Also allows tests to specify their own embedder contexts.
      22ee8ee0
    • C
      Make it easy to write embedder unit tests by creating a fixture and config builder. (#8276) · d6ead18f
      Chinmay Garde 提交于
      All embedder unit-tests have to setup the Flutter project arguments from scratch
      before launching the engine. The boilerplate and having to deal with the low
      level C API during each engine launch is a hinderance to writing tests.
      
      This patch introduces an EmbedderTest fixture that sets up all the embedder side snapshots before allowing the unit test to create a FlutterConfigBuilder` that
      the test can use to incrementally build and edit the Flutter project
      configuration. From the given state state of a configuration, multiple engines
      can be launched with their lifecylces managed by appropriate RAII wrappers.
      
      This allows the a fully configured Flutter engine to be launched using 4 lines
      of code in a fixture.
      
      ```
      EmbedderConfigBuilder builder;
      builder.SetSoftwareRendererConfig();
      builder.SetAssetsPathFromFixture(this);
      builder.SetSnapshotsFromFixture(this);
      auto engine = builder.LaunchEngine();
      ```
      d6ead18f
  13. 16 2月, 2019 1 次提交
  14. 07 2月, 2019 1 次提交
    • C
      Add FlutterProjectArgs::root_isolate_create_callback (#7651) · ce073991
      Chris Bracken 提交于
      Allows embedders to specify a callback to be invoked in isolate scope
      once root isolate has been created and marked runnable.
      
      As an example of where this is useful, embedder unit test fixtures may
      want to include Dart functions backed by a native implementation. On
      isolate creation, this patch allows the unit test author to call
      Dart_SetNativeResolver in root isolate scope.
      ce073991
  15. 30 1月, 2019 1 次提交
    • S
      Rename FlutterResult in embedder.h (#7567) · 474d8837
      stuartmorgan 提交于
      FlutterResult is also the name of a class in the Objective-C API
      surface, which is problematic when building a framework that contains
      both (such as a macOS implementation of the Flutter framework).
      474d8837
  16. 17 1月, 2019 1 次提交
    • C
      Deprecate FlutterProjectArgs.main_path, packages_path (#7497) · 1e93a8eb
      Chris Bracken 提交于
      As of Dart 2, running from Dart source is no longer supported.  Dart
      code should now be compiled to kernel form and will be loaded by from
      kernel.blob in the assets directory. We retain the struct members for ABI
      stability. package_path is also not required since kernel blobs are
      self-contained.
      1e93a8eb
  17. 17 12月, 2018 1 次提交
    • C
      Compile embedder unit test Dart to kernel (#7231) · 67cd7d4d
      Chris Bracken 提交于
      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 ac9e521a, which was
      reverted in commit 49411258. 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.
      67cd7d4d
  18. 16 12月, 2018 2 次提交
    • C
      Revert "Compile embedder unit test Dart to kernel (#7227)" (#7230) · 49411258
      Chris Bracken 提交于
      This reverts commit ac9e521a.
      
      This broke dynamic release mode builds of
      //flutter/runtime:runtime_fixtures_kernel (likely all product-mode
      builds).
      49411258
    • C
      Compile embedder unit test Dart to kernel (#7227) · ac9e521a
      Chris Bracken 提交于
      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.
      ac9e521a
  19. 27 11月, 2018 1 次提交
  20. 08 11月, 2018 1 次提交
  21. 26 5月, 2018 1 次提交
  22. 31 10月, 2017 1 次提交
  23. 26 10月, 2017 1 次提交