5#include "flutter/testing/dart_fixture.h"
8#include "flutter/fml/paths.h"
18 std::string elf_filename,
19 std::string elf_split_filename)
22 std::move(elf_split_filename))),
23 kernel_filename_(
std::move(kernel_filename)),
34 settings.task_observer_remove = [](intptr_t) {};
35 settings.isolate_create_callback = [
this]() {
61 std::vector<std::unique_ptr<const fml::Mapping>> kernel_mappings;
64 if (!kernel_mapping || !kernel_mapping->IsValid()) {
65 FML_LOG(
ERROR) <<
"Could not find kernel blob for test fixture not "
66 "running in precompiled mode.";
67 return kernel_mappings;
69 kernel_mappings.emplace_back(std::move(kernel_mapping));
70 return kernel_mappings;
static bool IsRunningPrecompiledCode()
Checks if VM instances in the process can run precompiled code. This call can be made at any time and...
fml::UniqueFD assets_dir_
std::string kernel_filename_
void SetSnapshotsAndAssets(Settings &settings)
void AddFfiNativeCallback(const std::string &name, void *callback_ptr)
virtual Settings CreateSettingsForFixture()
ELFAOTSymbols aot_symbols_
void AddNativeCallback(const std::string &name, Dart_NativeFunction callback)
std::shared_ptr< TestDartNativeResolver > native_resolver_
static std::unique_ptr< FileMapping > CreateReadOnly(const std::string &path)
void(* Dart_NativeFunction)(Dart_NativeArguments arguments)
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
#define FML_LOG(severity)
#define FML_CHECK(condition)
const char * GetFixturesPath()
Returns the directory containing the test fixture for the target if this target has fixtures configur...
ELFAOTSymbols LoadELFSymbolFromFixturesIfNeccessary(std::string elf_filename)
Attempts to resolve AOT symbols from the portable ELF loader. This location is automatically resolved...
bool PrepareSettingsForAOTWithSymbols(Settings &settings, const ELFAOTSymbols &symbols)
Prepare the settings objects various AOT mappings resolvers with the symbols already loaded....
ELFAOTSymbols LoadELFSplitSymbolFromFixturesIfNeccessary(std::string elf_split_filename)
Attempts to resolve split loading unit AOT symbols from the portable ELF loader. If the dart code doe...
const char * GetTestingAssetsPath()
Returns the directory containing assets shared across all tests.
constexpr const char * kDefaultAOTAppELFSplitFileName
constexpr const char * kDefaultAOTAppELFFileName
DEF_SWITCHES_START aot vmservice shared library name
std::vector< std::unique_ptr< const fml::Mapping > > Mappings
std::string JoinPaths(std::initializer_list< std::string > components)
fml::UniqueFD OpenDirectory(const char *path, bool create_if_necessary, FilePermission permission)
std::function< void()> closure