Home | History | Annotate | Download | only in adb

Lines Matching refs:adb

17 """Tests for the adb program itself.
33 import adb
37 """Tests for ADB that aren't a part of the AndroidDevice API."""
42 ['adb', 'help'], stderr=subprocess.STDOUT)
46 """Get a version number out of the output of adb."""
47 lines = subprocess.check_output(['adb', 'version']).splitlines()
52 # Newer versions of ADB have a second line of output for the
59 p = subprocess.Popen(['adb', 'tcpip'], stdout=subprocess.PIPE,
65 p = subprocess.Popen(['adb', 'tcpip', 'foo'], stdout=subprocess.PIPE,
76 # Test that launch_server() does not let the adb server inherit
77 # stdin/stdout/stderr handles which can cause callers of adb.exe to hang.
81 # This test takes 5 seconds to run on Windows: if there is no adb server
82 # running on the the port used below, adb kill-server tries to make a
84 # adb start-server does the same TCP connection which takes another
87 # Start adb client with redirected stdin/stdout/stderr to check if it
88 # passes those redirections to the adb server that it starts. To do
89 # this, run an instance of the adb server on a non-default port so we
90 # don't conflict with a pre-existing adb server that may already be
91 # setup with adb TCP/emulator connections. If there is a pre-existing
92 # adb server, this also tests whether multiple instances of the adb
93 # server conflict on adb.log.
97 subprocess.check_output(['adb', '-P', str(port), 'kill-server'],
101 # Run the adb client and have it start the adb server.
102 p = subprocess.Popen(['adb', '-P', str(port), 'start-server'],
121 # Wait for the adb client to finish. Once that has occurred, if
122 # stdin/stderr/stdout are still open, it must be open in the adb
128 # stdin must still be open in the adb server. The adb client is
129 # probably letting the adb server inherit stdin which would be
136 # stdout/stderr were not closed and and they must be open in the adb
137 # server, suggesting that the adb client is letting the adb server
139 self.assertTrue(stdout_event.wait(5), "adb stdout not closed")
140 self.assertTrue(stderr_event.wait(5), "adb stderr not closed")
143 subprocess.check_output(['adb', '-P', str(port), 'kill-server'],
161 """Ensure that adb emu kill works.
175 # Now that listening has started, start adb emu kill, telling it to
178 ['adb', '-s', 'emulator-' + str(port), 'emu', 'kill'],
184 # then adb probably isn't reading the data that we sent it.
195 # Use SO_LINGER to send TCP RST segment to test whether adb
203 # Wait for adb to finish, so we can check return code.
206 # If this fails, adb probably isn't ignoring WSAECONNRESET when
207 # reading the response from the adb emu kill command (on Windows).
211 """Ensure that `adb connect localhost:1234` will try both IPv4 and IPv6.
226 ['adb', 'connect', 'localhost:{}'.format(port)])
235 if len(adb.get_devices()) > 0: