mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Disable failing unit tests on UWP (flutter/engine#28785)
In order to enable all the currently-passing Windows UWP unit tests and prevent any regressions, I've disabled currently-failing tests so we can enable the passing unit tests as part of presubmit. Most of the failures fall into one of the following categories: * threading issues (accessing an object from the wrong thread) * filesystem sandboxing issues (trying to access a path outside the sandbox) * network issues (trying to connect to sandboxed vm service)
This commit is contained in:
parent
499144dc36
commit
d50ad5051d
@ -41,6 +41,11 @@ static void WaitForRaster(Shell* shell) {
|
||||
}
|
||||
|
||||
TEST_F(PersistentCacheTest, CacheSkSLWorks) {
|
||||
#if defined(WINUWP)
|
||||
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
|
||||
GTEST_SKIP() << "Skipped on WinUWP; requires vm service sandboxing fix";
|
||||
#endif // defined(WINUWP)
|
||||
|
||||
// Create a temp dir to store the persistent cache
|
||||
fml::ScopedTemporaryDirectory dir;
|
||||
PersistentCache::SetCacheDirectoryPath(dir.path());
|
||||
@ -204,6 +209,11 @@ static void CheckTwoSkSLsAreLoaded() {
|
||||
}
|
||||
|
||||
TEST_F(PersistentCacheTest, CanLoadSkSLsFromAsset) {
|
||||
#if defined(WINUWP)
|
||||
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
|
||||
GTEST_SKIP() << "Skipped on WinUWP; requires filesystem sandboxing fix";
|
||||
#endif // defined(WINUWP)
|
||||
|
||||
// Avoid polluting unit tests output by hiding INFO level logging.
|
||||
fml::LogSettings warning_only = {fml::LOG_WARNING};
|
||||
fml::ScopedSetLogSettings scoped_set_log_settings(warning_only);
|
||||
@ -268,6 +278,11 @@ TEST_F(PersistentCacheTest, CanLoadSkSLsFromAsset) {
|
||||
}
|
||||
|
||||
TEST_F(PersistentCacheTest, CanRemoveOldPersistentCache) {
|
||||
#if defined(WINUWP)
|
||||
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
|
||||
GTEST_SKIP() << "Skipped on WinUWP; requires filesystem sandboxing fix";
|
||||
#endif // defined(WINUWP)
|
||||
|
||||
fml::ScopedTemporaryDirectory base_dir;
|
||||
ASSERT_TRUE(base_dir.fd().is_valid());
|
||||
|
||||
@ -298,6 +313,11 @@ TEST_F(PersistentCacheTest, CanRemoveOldPersistentCache) {
|
||||
}
|
||||
|
||||
TEST_F(PersistentCacheTest, CanPurgePersistentCache) {
|
||||
#if defined(WINUWP)
|
||||
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
|
||||
GTEST_SKIP() << "Skipped on WinUWP; requires filesystem sandboxing fix";
|
||||
#endif // defined(WINUWP)
|
||||
|
||||
fml::ScopedTemporaryDirectory base_dir;
|
||||
ASSERT_TRUE(base_dir.fd().is_valid());
|
||||
auto cache_dir = fml::CreateDirectory(
|
||||
@ -330,6 +350,11 @@ TEST_F(PersistentCacheTest, CanPurgePersistentCache) {
|
||||
}
|
||||
|
||||
TEST_F(PersistentCacheTest, PurgeAllowsFutureSkSLCache) {
|
||||
#if defined(WINUWP)
|
||||
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
|
||||
GTEST_SKIP() << "Skipped on WinUWP; requires filesystem sandboxing fix";
|
||||
#endif // defined(WINUWP)
|
||||
|
||||
sk_sp<SkData> shader_key = SkData::MakeWithCString("key");
|
||||
sk_sp<SkData> shader_value = SkData::MakeWithCString("value");
|
||||
std::string shader_filename = PersistentCache::SkKeyToFilePath(*shader_key);
|
||||
|
||||
@ -440,6 +440,11 @@ TEST_F(ShellTest, LastEntrypoint) {
|
||||
}
|
||||
|
||||
TEST_F(ShellTest, DisallowedDartVMFlag) {
|
||||
#if defined(WINUWP)
|
||||
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
|
||||
GTEST_SKIP() << "Skipped on WinUWP; requires fix";
|
||||
#endif // defined(WINUWP)
|
||||
|
||||
// Run this test in a thread-safe manner, otherwise gtest will complain.
|
||||
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
||||
|
||||
@ -454,6 +459,10 @@ TEST_F(ShellTest, DisallowedDartVMFlag) {
|
||||
}
|
||||
|
||||
TEST_F(ShellTest, AllowedDartVMFlag) {
|
||||
#if defined(WINUWP)
|
||||
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
|
||||
GTEST_SKIP() << "Skipped on WinUWP; requires fix";
|
||||
#endif // defined(WINUWP)
|
||||
std::vector<const char*> flags = {
|
||||
"--enable-isolate-groups",
|
||||
"--no-enable-isolate-groups",
|
||||
@ -466,6 +475,7 @@ TEST_F(ShellTest, AllowedDartVMFlag) {
|
||||
flags.push_back("--enable_mirrors");
|
||||
}
|
||||
#endif
|
||||
|
||||
TestDartVmFlags(flags);
|
||||
}
|
||||
|
||||
@ -756,6 +766,10 @@ TEST_F(ShellTest,
|
||||
OnPlatformViewDestroyDisablesThreadMerger
|
||||
#endif
|
||||
) {
|
||||
#if defined(WINUWP)
|
||||
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
|
||||
GTEST_SKIP() << "Skipped on WinUWP. Not yet implemented";
|
||||
#endif // defined(WINUWP)
|
||||
auto settings = CreateSettingsForFixture();
|
||||
fml::RefPtr<fml::RasterThreadMerger> raster_thread_merger;
|
||||
auto end_frame_callback =
|
||||
@ -1336,6 +1350,11 @@ TEST_F(ShellTest, ReloadSystemFonts) {
|
||||
}
|
||||
|
||||
TEST_F(ShellTest, WaitForFirstFrame) {
|
||||
#if defined(WINUWP)
|
||||
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
|
||||
GTEST_SKIP() << "Skipped on WinUWP; requires fix";
|
||||
#endif // defined(WINUWP)
|
||||
|
||||
auto settings = CreateSettingsForFixture();
|
||||
std::unique_ptr<Shell> shell = CreateShell(settings);
|
||||
|
||||
@ -1391,6 +1410,11 @@ TEST_F(ShellTest, WaitForFirstFrameTimeout) {
|
||||
}
|
||||
|
||||
TEST_F(ShellTest, WaitForFirstFrameMultiple) {
|
||||
#if defined(WINUWP)
|
||||
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
|
||||
GTEST_SKIP() << "Skipped on WinUWP; requires threading fix";
|
||||
#endif // defined(WINUWP)
|
||||
|
||||
auto settings = CreateSettingsForFixture();
|
||||
std::unique_ptr<Shell> shell = CreateShell(settings);
|
||||
|
||||
@ -1415,6 +1439,11 @@ TEST_F(ShellTest, WaitForFirstFrameMultiple) {
|
||||
/// Makes sure that WaitForFirstFrame works if we rendered a frame with the
|
||||
/// single-thread setup.
|
||||
TEST_F(ShellTest, WaitForFirstFrameInlined) {
|
||||
#if defined(WINUWP)
|
||||
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
|
||||
GTEST_SKIP() << "Skipped on WinUWP; requires threading fix";
|
||||
#endif // defined(WINUWP)
|
||||
|
||||
Settings settings = CreateSettingsForFixture();
|
||||
auto task_runner = CreateNewThread();
|
||||
TaskRunners task_runners("test", task_runner, task_runner, task_runner,
|
||||
@ -2001,6 +2030,11 @@ TEST_F(ShellTest, CanRegisterImageDecoders) {
|
||||
}
|
||||
|
||||
TEST_F(ShellTest, OnServiceProtocolGetSkSLsWorks) {
|
||||
#if defined(WINUWP)
|
||||
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
|
||||
GTEST_SKIP() << "Skipped on WinUWP; requires vm service sandboxing fix";
|
||||
#endif // defined(WINUWP)
|
||||
|
||||
fml::ScopedTemporaryDirectory base_dir;
|
||||
ASSERT_TRUE(base_dir.fd().is_valid());
|
||||
PersistentCache::SetCacheDirectoryPath(base_dir.path());
|
||||
@ -2432,6 +2466,11 @@ TEST_F(ShellTest, IgnoresInvalidMetrics) {
|
||||
}
|
||||
|
||||
TEST_F(ShellTest, OnServiceProtocolSetAssetBundlePathWorks) {
|
||||
#if defined(WINUWP)
|
||||
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
|
||||
GTEST_SKIP() << "Skipped on WinUWP; requires vm service sandboxing fix";
|
||||
#endif // defined(WINUWP)
|
||||
|
||||
Settings settings = CreateSettingsForFixture();
|
||||
std::unique_ptr<Shell> shell = CreateShell(settings);
|
||||
RunConfiguration configuration =
|
||||
@ -2504,6 +2543,11 @@ TEST_F(ShellTest, EngineRootIsolateLaunchesDontTakeVMDataSettings) {
|
||||
}
|
||||
|
||||
TEST_F(ShellTest, AssetManagerSingle) {
|
||||
#if defined(WINUWP)
|
||||
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
|
||||
GTEST_SKIP() << "Skipped on WinUWP; requires filesystem sandboxing fix";
|
||||
#endif // defined(WINUWP)
|
||||
|
||||
fml::ScopedTemporaryDirectory asset_dir;
|
||||
fml::UniqueFD asset_dir_fd = fml::OpenDirectory(
|
||||
asset_dir.path().c_str(), false, fml::FilePermission::kRead);
|
||||
@ -2529,6 +2573,11 @@ TEST_F(ShellTest, AssetManagerSingle) {
|
||||
}
|
||||
|
||||
TEST_F(ShellTest, AssetManagerMulti) {
|
||||
#if defined(WINUWP)
|
||||
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
|
||||
GTEST_SKIP() << "Skipped on WinUWP; requires filesystem sandboxing fix";
|
||||
#endif // defined(WINUWP)
|
||||
|
||||
fml::ScopedTemporaryDirectory asset_dir;
|
||||
fml::UniqueFD asset_dir_fd = fml::OpenDirectory(
|
||||
asset_dir.path().c_str(), false, fml::FilePermission::kRead);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user