mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Merge pull request #317 from eseidelGoogle/mac_testing
Make test_sky work on Mac!
This commit is contained in:
commit
a3c3a63250
2
sky/dist/BUILD.gn
vendored
2
sky/dist/BUILD.gn
vendored
@ -26,7 +26,7 @@ copy("sky_shell") {
|
||||
]
|
||||
} else if (is_ios || is_mac) {
|
||||
sources = [
|
||||
"$root_build_dir/Sky.app",
|
||||
"$root_build_dir/SkyShell.app",
|
||||
]
|
||||
|
||||
deps = [
|
||||
|
||||
@ -168,7 +168,7 @@ if (is_android) {
|
||||
import("//build/config/ios/ios_sdk.gni")
|
||||
|
||||
ios_app("shell") {
|
||||
app_name = "Sky"
|
||||
app_name = "SkyShell"
|
||||
info_plist = "ios/Info.plist"
|
||||
scaffolding_target = "ios_scaffolding"
|
||||
entitlements_path = "ios/Entitlements.xcent"
|
||||
@ -232,7 +232,7 @@ if (is_android) {
|
||||
import("//build/config/mac/rules.gni")
|
||||
|
||||
mac_app("shell") {
|
||||
app_name = "Sky"
|
||||
app_name = "SkyShell"
|
||||
info_plist = "mac/Info.plist"
|
||||
scaffolding_target = "mac_scaffolding"
|
||||
|
||||
|
||||
@ -2,15 +2,16 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "sky/engine/wtf/Assertions.h"
|
||||
#include "sky/shell/service_provider.h"
|
||||
#include "base/single_thread_task_runner.h"
|
||||
#include "base/bind.h"
|
||||
#include "base/bind_helpers.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/location.h"
|
||||
#include "base/single_thread_task_runner.h"
|
||||
#include "mojo/public/cpp/application/service_provider_impl.h"
|
||||
#include "sky/engine/wtf/Assertions.h"
|
||||
#include "sky/services/ns_net/network_service_impl.h"
|
||||
#include "sky/shell/service_provider.h"
|
||||
#include "sky/shell/testing/test_runner.h"
|
||||
|
||||
namespace sky {
|
||||
namespace shell {
|
||||
@ -26,6 +27,7 @@ static void CreatePlatformServiceProvider(
|
||||
g_service_provider.Get().reset(new mojo::ServiceProviderImpl(request.Pass()));
|
||||
g_network_service_factory.Get().reset(new mojo::NetworkServiceFactory());
|
||||
g_service_provider.Get()->AddService(g_network_service_factory.Get().get());
|
||||
g_service_provider.Get()->AddService(&TestRunner::Shared());
|
||||
}
|
||||
|
||||
mojo::ServiceProviderPtr CreateServiceProvider(
|
||||
|
||||
@ -634,9 +634,6 @@ class AndroidPort(base.Port):
|
||||
def _path_to_driver(self, configuration=None):
|
||||
return self._build_path_with_configuration(configuration, self._driver_details.apk_name())
|
||||
|
||||
def _path_to_helper(self):
|
||||
return None
|
||||
|
||||
def _path_to_image_diff(self):
|
||||
return self._host_port._path_to_image_diff()
|
||||
|
||||
|
||||
@ -326,11 +326,6 @@ class Port(object):
|
||||
else:
|
||||
_log.error('')
|
||||
|
||||
helper_path = self._path_to_helper()
|
||||
if helper_path:
|
||||
result = self._check_file_exists(helper_path,
|
||||
'layout test helper') and result
|
||||
|
||||
if self.get_option('pixel_tests'):
|
||||
result = self.check_image_diff(
|
||||
'To override, invoke with --no-pixel-tests') and result
|
||||
@ -1407,14 +1402,6 @@ class Port(object):
|
||||
"""Returns the full path to a built copy of WebCore."""
|
||||
return None
|
||||
|
||||
def _path_to_helper(self):
|
||||
"""Returns the full path to the layout_test_helper binary, which
|
||||
is used to help configure the system for the test run, or None
|
||||
if no helper is needed.
|
||||
|
||||
This is likely only used by start/stop_helper()."""
|
||||
return None
|
||||
|
||||
def _path_to_image_diff(self):
|
||||
"""Returns the full path to the image_diff binary, or None if it is not available.
|
||||
|
||||
|
||||
@ -157,6 +157,3 @@ class LinuxPort(base.Port):
|
||||
def _path_to_driver(self, configuration=None):
|
||||
binary_name = self.driver_name()
|
||||
return self._build_path_with_configuration(configuration, binary_name)
|
||||
|
||||
def _path_to_helper(self):
|
||||
return None
|
||||
|
||||
@ -91,6 +91,9 @@ class MacPort(base.Port):
|
||||
def operating_system(self):
|
||||
return 'mac'
|
||||
|
||||
def driver_name(self):
|
||||
return 'SkyShell'
|
||||
|
||||
#
|
||||
# PROTECTED METHODS
|
||||
#
|
||||
@ -108,9 +111,5 @@ class MacPort(base.Port):
|
||||
# FIXME: make |configuration| happy with case-sensitive file systems.
|
||||
return self._build_path_with_configuration(configuration, self.driver_name() + '.app', 'Contents', 'MacOS', self.driver_name())
|
||||
|
||||
def _path_to_helper(self):
|
||||
binary_name = 'layout_test_helper'
|
||||
return self._build_path(binary_name)
|
||||
|
||||
def _path_to_wdiff(self):
|
||||
return 'wdiff'
|
||||
return None
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user