android_system_core/adb
Spencer Low de4505f819 adb unittest: get test_unicode_paths passing on win32
The Python 2 subprocess class doesn't use Unicode, so as a work-around
write the command line to a UTF-8 batch file and run that.

I modified the test to use u'blah' without .encode('utf-8') because the
Python docs recommend dealing with string variables like that. When
formatting a string with a unicode parameter, use u'foo' on the constant
string to make it unicode.

I also tested this on Linux and it seems to work fine (I did ls in the
middle of the test to make sure the filenames came out right, etc.).

I had to close the temporary files before adb tries to read/write them
because filesystem semantics are different on Windows (technically I
might be able to modify adb to try to open files with more permissive
share flags, but then I'm not sure if Python uses the right share flags.
Basically, I'd be opening another can of worms.).

Fixed the test to delete a temp file on the device once it is done.

Change-Id: Id0c34e26d7697fbbb47a44ae45298bed5e8c59d6
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-08-28 01:20:03 -07:00
..
client Use glog for logging in the OSX USB layer 2015-08-24 08:22:15 -07:00
daemon adb: poll for emulator connection. 2015-07-31 14:25:19 -07:00
.clang-format Fix clang-format file for correct indent settings. 2015-03-19 13:27:20 -07:00
__init__.py Create adb Python package. 2015-07-27 15:52:15 -07:00
adb.cpp adb: keep all asocket operations in the main thread. 2015-08-26 11:27:43 -07:00
adb.h Add feature list to connection banner. 2015-08-14 08:24:37 -07:00
adb_auth.cpp Increase size of the the adb packets sent over the wire 2015-07-22 13:06:06 -07:00
adb_auth.h Ignore ro.adb.secure in user builds. 2015-06-18 10:19:30 -07:00
adb_auth_client.cpp Increase size of the the adb packets sent over the wire 2015-07-22 13:06:06 -07:00
adb_auth_host.cpp adb: win32: call SystemErrorCodeToString() from more places 2015-08-02 18:50:17 -07:00
adb_client.cpp adb sync cleanup. 2015-08-24 11:15:01 -07:00
adb_client.h Fix error handling/reporting for "adb forward" and "adb reverse". 2015-05-29 18:03:57 -07:00
adb_io.cpp adb sync cleanup. 2015-08-24 11:15:01 -07:00
adb_io.h adb sync cleanup. 2015-08-24 11:15:01 -07:00
adb_io_test.cpp adb_test/libbase_test: win32: get some tests working 2015-08-03 12:44:43 -07:00
adb_listeners.cpp adb: improve network error info 2015-08-11 16:45:32 -07:00
adb_listeners.h adb: win32: initial IPv6 support and improved Winsock error reporting 2015-07-30 23:07:55 -07:00
adb_trace.h Improve logging. 2015-05-21 16:25:57 -07:00
adb_utils.cpp adb sync cleanup. 2015-08-24 11:15:01 -07:00
adb_utils.h adb sync cleanup. 2015-08-24 11:15:01 -07:00
adb_utils_test.cpp win32: adb_test/libbase_test fixes 2015-08-06 18:09:32 -07:00
adbd.rc bundle init.rc contents with its service 2015-08-21 10:14:43 -07:00
Android.mk Don't build 32-bit host libadb. 2015-08-25 19:38:14 -07:00
commandline.cpp EINTR is handled by adb_read/unix_read and friends. 2015-08-25 10:59:45 -07:00
console.cpp adb: win32: initial IPv6 support and improved Winsock error reporting 2015-07-30 23:07:55 -07:00
CPPLINT.cfg Ignore whitespace/indent issues from cpplint. 2015-05-18 16:49:07 -07:00
device.py adb unittest: get test_unicode_paths passing on win32 2015-08-28 01:20:03 -07:00
fdevent.cpp EINTR is handled by adb_read/unix_read and friends. 2015-08-25 10:59:45 -07:00
fdevent.h Remove extern "C" barriers to using C++. 2015-04-17 09:47:42 -07:00
file_sync_client.cpp EINTR is handled by adb_read/unix_read and friends. 2015-08-25 10:59:45 -07:00
file_sync_service.cpp Not all filesystems support setting SELinux labels. 2015-08-25 16:33:50 -07:00
file_sync_service.h There are no big endian hosts, grandpa. 2015-08-24 14:27:03 -07:00
framebuffer_service.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
get_my_path_darwin.cpp Move get_my_path_darwin to C++. 2015-04-16 13:24:58 -07:00
get_my_path_linux.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
jdwp_service.cpp Report getaddrinfo failures correctly. 2015-07-23 21:14:38 -07:00
MODULE_LICENSE_APACHE2 eclair snapshot 2009-11-12 18:46:23 -08:00
mutex_list.h adb: fix mkdirs / adb pull with relative paths, fix win32 issues 2015-08-03 13:24:18 -07:00
NOTICE eclair snapshot 2009-11-12 18:46:23 -08:00
OVERVIEW.TXT Fixing spelling errors in adb docs 2010-04-28 11:38:39 -04:00
protocol.txt Increase size of the the adb packets sent over the wire 2015-07-22 13:06:06 -07:00
qemu_tracing.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
qemu_tracing.h Revert "Turn on -Wformat-nonliteral." 2015-07-09 20:35:09 +00:00
remount_service.cpp Fix "adb remount" for when the root directory is in system.img 2015-07-08 19:36:19 +00:00
remount_service.h Failure to find an oem partition should not be a remount failure. 2015-05-11 13:28:22 -07:00
services.cpp adb sync cleanup. 2015-08-24 11:15:01 -07:00
SERVICES.TXT adb sync cleanup. 2015-08-24 11:15:01 -07:00
set_verity_enable_state_service.cpp Failure to find an oem partition should not be a remount failure. 2015-05-11 13:28:22 -07:00
sockets.cpp adb: fix a data race in local_socket_event_func. 2015-08-26 15:06:43 -07:00
sockets.dia auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
SYNC.TXT adb sync cleanup. 2015-08-24 11:15:01 -07:00
sysdeps.h adb: win32: write ACK to separate pipe instead of stdout 2015-08-08 15:07:07 -07:00
sysdeps_win32.cpp Merge "adb: improve network error info" 2015-08-13 17:49:21 +00:00
test_adb.py Create adb Python package. 2015-07-27 15:52:15 -07:00
test_device.py adb unittest: get test_unicode_paths passing on win32 2015-08-28 01:20:03 -07:00
test_track_devices.cpp Add missing includes. 2015-08-11 16:39:57 -07:00
transport.cpp adb: keep all asocket operations in the main thread. 2015-08-26 11:27:43 -07:00
transport.h Add feature list to connection banner. 2015-08-14 08:24:37 -07:00
transport_local.cpp Remove confusing variable HOST. 2015-08-11 14:00:15 -07:00
transport_test.cpp Add feature list to connection banner. 2015-08-14 08:24:37 -07:00
transport_usb.cpp Remove confusing variable HOST. 2015-08-11 14:00:15 -07:00
usb_linux.cpp Fix const-ness of strrchr callers. 2015-07-28 08:07:21 -07:00
usb_linux_client.cpp EINTR is handled by adb_read/unix_read and friends. 2015-08-25 10:59:45 -07:00
usb_osx.cpp Possible Mac build fix. 2015-08-25 17:48:12 -07:00
usb_windows.cpp adb: win32: fix USB device hang when resuming from sleep/hibernation 2015-08-01 19:19:09 -07:00