summaryrefslogtreecommitdiff
path: root/base/errors_unix.cpp
diff options
context:
space:
mode:
authorSpencer Low <CompareAndSwap@gmail.com>2015-08-27 20:58:29 -0700
committerSpencer Low <CompareAndSwap@gmail.com>2015-08-28 01:20:03 -0700
commitde4505f8196114a348d0735a940e507d630bbb63 (patch)
tree706a2dd9449808c6ed42add0f27aefd21c3f8071 /base/errors_unix.cpp
parent804180b2ccf2ef4dedad7d136c060ecbdda7aac5 (diff)
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>
Diffstat (limited to 'base/errors_unix.cpp')
0 files changed, 0 insertions, 0 deletions