Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: build/android/pylib/local/local_test_server_spawner.py

Issue 2101243005: Add a snapshot of flutter/engine/src/build to our sdk (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add README.dart Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 from pylib import chrome_test_server_spawner
6 from pylib import forwarder
7 from pylib.base import test_server
8
9
10 class LocalTestServerSpawner(test_server.TestServer):
11
12 def __init__(self, port, device, tool):
13 super(LocalTestServerSpawner, self).__init__()
14 self._device = device
15 self._spawning_server = chrome_test_server_spawner.SpawningServer(
16 port, device, tool)
17 self._tool = tool
18
19 @property
20 def server_address(self):
21 return self._spawning_server.server.server_address
22
23 @property
24 def port(self):
25 return self.server_address[1]
26
27 #override
28 def SetUp(self):
29 self._device.WriteFile(
30 '%s/net-test-server-ports' % self._device.GetExternalStoragePath(),
31 '%s:0' % str(self.port))
32 forwarder.Forwarder.Map(
33 [(self.port, self.port)], self._device, self._tool)
34 self._spawning_server.Start()
35
36 #override
37 def Reset(self):
38 self._spawning_server.CleanupState()
39
40 #override
41 def TearDown(self):
42 self.Reset()
43 self._spawning_server.Stop()
44 forwarder.Forwarder.UnmapDevicePort(self.port, self._device)
45
OLDNEW
« no previous file with comments | « build/android/pylib/local/device/local_device_test_run.py ('k') | build/android/pylib/monkey/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698