mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Add support for Mac vs. Linux sky_server builds
I also made sky_server get pulled down via DEPS since thats how all the rest of our google storage-based binaries work. R=jamesr@chromium.org, jackson@google.com TBR=abarth@chromium.org Review URL: https://codereview.chromium.org/1150033006
This commit is contained in:
parent
9d9486d20e
commit
dc82febb38
@ -30,7 +30,7 @@ determine whether its using android, for example.
|
||||
Running tests manually
|
||||
----------------------
|
||||
|
||||
* ``out/downloads/sky_server -t Debug . 8000`` (If you don't have ``sky_server`` yet, run ``sky/tools/download_sky_server``.)
|
||||
* ``sky/tools/skygo/linux64/sky_server -t Debug . 8000``
|
||||
* ``out/Debug/mojo_shell --args-for="mojo:native_viewport_service --use-headless-config --use-osmesa" --args-for"=mojo:sky_viewer --testing" --content-handlers=text/sky,mojo:sky_viewer --url-mappings=mojo:window_manager=mojo:sky_tester,mojo:surfaces_service=mojo:fake_surfaces_service mojo:window_manager``
|
||||
* The ``sky_tester`` should print ``#READY`` when ready
|
||||
* Type the URL you wish to run, for example ``http://127.0.0.1:8000/sky/tests/lowlevel/text.html``, and press the enter key
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright (c) 2014 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import os
|
||||
import stat
|
||||
import subprocess
|
||||
|
||||
from webkitpy.common.system import filesystem
|
||||
from webkitpy.common.webkit_finder import WebKitFinder
|
||||
|
||||
finder = WebKitFinder(filesystem.FileSystem())
|
||||
|
||||
output_file_ = finder.path_from_chromium_base('out', 'downloads', 'sky_server')
|
||||
subprocess.call([
|
||||
'download_from_google_storage',
|
||||
'--no_resume',
|
||||
'--no_auth',
|
||||
'--bucket', 'mojo',
|
||||
'--sha1_file', finder.path_from_chromium_base('sky', 'tools', 'skygo', 'sky_server.sha1'),
|
||||
'--output', output_file_
|
||||
])
|
||||
os.chmod(output_file_, os.stat(output_file_).st_mode | stat.S_IEXEC)
|
||||
@ -2,18 +2,18 @@ sky_server instructions
|
||||
#######################
|
||||
|
||||
Building locally:
|
||||
1. cd sky/tools/skygo
|
||||
2. go build sky_server.go
|
||||
1. cd sky/tools/skygo/linux64 (or your current platform)
|
||||
2. go build ../sky_server.go
|
||||
|
||||
Testing locally:
|
||||
1. Build as per the above steps
|
||||
2. Run test_sky --path-to-server /absolute/path/to/sky/tools/skygo/sky_server
|
||||
|
||||
Uploading the locally built server
|
||||
1. cd sky/tools/skygo
|
||||
1. cd sky/tools/skygo/linux64
|
||||
2. upload_to_google_storage.py --bucket mojo sky_server
|
||||
|
||||
upload_to_google_storage.py is in depot_tools. It will overwrite
|
||||
sky_server.sha1. Include that change in your code review.
|
||||
|
||||
sky_server was last built using go version go1.4.2 linux/amd64.
|
||||
linux64/sky_server was last built using go version go1.4.2 linux/amd64.
|
||||
|
||||
1
engine/src/flutter/tools/skygo/linux64/sky_server.sha1
Normal file
1
engine/src/flutter/tools/skygo/linux64/sky_server.sha1
Normal file
@ -0,0 +1 @@
|
||||
968d024a11557d4f77fea3ecdf6c3ef69bf214a1
|
||||
1
engine/src/flutter/tools/skygo/mac/sky_server.sha1
Normal file
1
engine/src/flutter/tools/skygo/mac/sky_server.sha1
Normal file
@ -0,0 +1 @@
|
||||
15ea315ff2a6fc22fd1fcbc7438f782645eaff84
|
||||
@ -1 +0,0 @@
|
||||
02d2a03fedfb85053f7f94a0f9464b228609658a
|
||||
@ -6,9 +6,11 @@ import socket
|
||||
import subprocess
|
||||
import logging
|
||||
import os.path
|
||||
import platform
|
||||
|
||||
SKYPY_PATH = os.path.dirname(os.path.abspath(__file__))
|
||||
SKY_TOOLS_PATH = os.path.dirname(SKYPY_PATH)
|
||||
SKYGO_PATH = os.path.join(SKY_TOOLS_PATH, 'skygo')
|
||||
SKY_ROOT = os.path.dirname(SKY_TOOLS_PATH)
|
||||
SRC_ROOT = os.path.dirname(SKY_ROOT)
|
||||
|
||||
@ -26,9 +28,16 @@ class SkyServer(object):
|
||||
return sock.connect_ex(('localhost', port)) == 0
|
||||
|
||||
@staticmethod
|
||||
def _download_server_if_necessary():
|
||||
subprocess.call(os.path.join(SKY_TOOLS_PATH, 'download_sky_server'))
|
||||
return os.path.join(SRC_ROOT, 'out', 'downloads', 'sky_server')
|
||||
def sky_server_path():
|
||||
|
||||
if platform.system() == 'Linux':
|
||||
platform_dir = 'linux64'
|
||||
elif platform.system() == 'Mac':
|
||||
platform_dir = 'mac'
|
||||
else:
|
||||
assert False, 'No sky_server binary for this platform?'
|
||||
|
||||
return os.path.join(SKYGO_PATH, platform_dir, 'sky_server')
|
||||
|
||||
def start(self):
|
||||
if self._port_in_use(self.port):
|
||||
@ -37,7 +46,7 @@ class SkyServer(object):
|
||||
self.port)
|
||||
return
|
||||
|
||||
server_path = self._download_server_if_necessary()
|
||||
server_path = self.sky_server_path()
|
||||
server_command = [
|
||||
server_path,
|
||||
'-t', self.configuration,
|
||||
|
||||
@ -10,6 +10,7 @@ import os
|
||||
import re
|
||||
import requests
|
||||
import skypy.configuration as configuration
|
||||
import skypy.skyserver
|
||||
import subprocess
|
||||
|
||||
|
||||
@ -69,10 +70,9 @@ class PerfHarness(object):
|
||||
self.args = args
|
||||
|
||||
def _start_server(self):
|
||||
subprocess.call(os.path.join(self.paths.sky_tools_directory,
|
||||
'download_sky_server'))
|
||||
# TODO(eseidel): Shouldn't this just use skyserver.py?
|
||||
return subprocess.Popen([
|
||||
os.path.join(self.paths.src_root, 'out', 'downloads', 'sky_server'),
|
||||
SkyServer.sky_server_path(),
|
||||
self.paths.src_root,
|
||||
str(HTTP_PORT),
|
||||
'-t', self.args.configuration
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user