diff --git a/BUILD.gn b/BUILD.gn index c5be744c10642..fca0f172b1b04 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -195,6 +195,7 @@ group("unittests") { "//flutter/shell/platform/embedder:embedder_a11y_unittests", "//flutter/shell/platform/embedder:embedder_proctable_unittests", "//flutter/shell/platform/embedder:embedder_unittests", + "//flutter/testing:testing_unittests", "//flutter/testing/dart", "//flutter/testing/smoke_test_failure", "//flutter/third_party/tonic/tests:tonic_unittests", diff --git a/testing/BUILD.gn b/testing/BUILD.gn index 2da76f07d75b3..4aa0ff9c524a8 100644 --- a/testing/BUILD.gn +++ b/testing/BUILD.gn @@ -204,10 +204,8 @@ if (is_mac || is_ios) { "test_metal_surface_impl.h", "test_metal_surface_impl.mm", ] - deps = [ - ":skia", - "//flutter/fml", - ] + deps = [ "//flutter/fml" ] + public_deps = [ ":skia" ] # Skia's Vulkan support is enabled for all platforms (except iOS), and so parts of # Skia's graphics context reference Vulkan symbols. @@ -246,3 +244,24 @@ if (use_swiftshader) { ] } } + +if (enable_unittests) { + executable("testing_unittests") { + testonly = true + + sources = [] + deps = [ + ":testing_fixtures", + "//flutter/third_party/googletest:gtest", + "//flutter/third_party/googletest:gtest_main", + ] + + if (test_enable_metal) { + cflags_objc = flutter_cflags_objc_arc + cflags_objcc = flutter_cflags_objcc_arc + + sources += [ "test_metal_surface_unittests.cc" ] + deps += [ ":metal" ] + } + } +} diff --git a/testing/run_tests.py b/testing/run_tests.py index d334108c8d546..eeba1321630f5 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -431,6 +431,7 @@ def make_test(name, flags=None, extra_env=None): make_test('fml_unittests'), make_test('no_dart_plugin_registrant_unittests'), make_test('runtime_unittests'), + make_test('testing_unittests'), make_test('tonic_unittests'), # The image release unit test can take a while on slow machines. make_test('ui_unittests', flags=repeat_flags + ['--timeout=90']),