DescriptionSupport HTTP test-server based net unit tests on Android.
This changes forwarder2 to support both test-server spawner and HTTP server
forwarding.
The main issue was that the device_forwarder was killed when instantiating a
second Forwarder (Python object).
Test server based unit tests require two device-to-host redirections, one for
the test server spawner and one for the HTTP server.
The port used by the HTTP server is allocated dynamically which means that we
can't know the full forwarding configuration before we spawn a HTTP server
(through the test server spawner).
This CL changes the forwarder to let it forward new ports while it is running
by making host_forwarder a daemon. This is similar to how ADB works.
This also means that a single host_forwarder process (daemon) can now handle
multiple devices.
BUG=146979
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=167167
Patch Set 1 : #Patch Set 2 : Remove blank line #Patch Set 3 : Remove duplicate include #
Total comments: 6
Patch Set 4 : Revert changes in net_unittests_disabled #
Total comments: 8
Patch Set 5 : Address Digit and Felipe's comments #Patch Set 6 : Avoid leaking 'ap' in common.h #
Total comments: 14
Patch Set 7 : Address Felipe's comments #Patch Set 8 : Fix potential invalid write in host_forwarder_main.cc #
Total comments: 11
Patch Set 9 : Address most of Felipe's comments #Patch Set 10 : Refine error handling in Daemon::Kill() #
Total comments: 17
Patch Set 11 : Address Marcus' comments #Patch Set 12 : Address David's comments #Patch Set 13 : Fix bug in socket.cc #Patch Set 14 : Small fixes in daemon.cc #Patch Set 15 : Fix Clang build + sync #
Total comments: 2
Messages
Total messages: 26 (0 generated)
|