summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/support
Commit message (Collapse)AuthorAgeFilesLines
* Move some of the common decorators to decorators.py.Zachary Turner2016-02-041-0/+16
| | | | | | | | | | | | This doesn't attempt to move every decorator. The reason for this is that it requires touching every single test file to import decorators.py. I would like to do this in a followup patch, but in the interest of keeping the patches as bite-sized as possible, I've only attempted to move the underlying common decorators first. A few tests call these directly, so those tests are updated as part of this patch. llvm-svn: 259807
* Always write the session file in UTF-8.Zachary Turner2016-02-011-0/+48
| | | | | | | | | | | | | | | | | | This patch attempts to solve the Python 2 / Python 3 incompatibilities by introducing a new `encoded_file` abstraction that we use instead of `io.open()`. The problem with the builtin implementation of `io.open` is that `read` and `write` accept and return `unicode` objects, which are not always convenient to work with in Python 2. We solve this by making `encoded_file.open()` return the same object returned by `io.open()` but with hooked `read()` and `write()` methods. These hooked methods will accept binary or text data, and conditionally convert what it gets to a `unicode` object using the correct encoding. When calling `read()` it also does any conversion necessary to convert the output back into the native `string` type of the running python version. Differential Revision: http://reviews.llvm.org/D16736 llvm-svn: 259379
* swig_bot remote path connection / preliminary implementation.Zachary Turner2015-11-241-0/+23
| | | | | | | | | | | | | | | With this patch, the client will package up all the required inputs into a compressed zip file, establish a connection to the server, send the input to the server, and wait for the server to send a response (in this case the response is just echoed back to the client). This gets the network communication in place, and in a subsequent patch I will follow up with the code that actually runs swig on the server and sends back the output instead of echoing back the input. llvm-svn: 254023
* Create `lldbsuite.support.fs` and move `find_executable` there.Zachary Turner2015-11-211-0/+64
| | | | | | | I have plans to reuse this function in another script, so raising this out of prepare_bindings allows this. llvm-svn: 253755
* Python 3 - Use universal_newlines when calling subprocess.check_outputZachary Turner2015-11-041-1/+1
| | | | | | | | | | | | | | | | | By default in Python 3, check_output() returns a program's output as an encoded byte sequence. This means it returns a Py3 `bytes` object, which cannot be compared to a string since it's a different fundamental type. Although it might not be correct from a purist standpoint, from a practical one we can assume that all output is encoded in the default locale, in which case using universal_newlines=True will decode it according to the current locale. Anyway, universal_newlines also has the nice behavior that it converts \r\n to \n on Windows platforms so this makes parsing code easier, should we need that. So it seems like a win/win. llvm-svn: 252025
* Introduce seven.cmp_ and use it instead of cmpZachary Turner2015-11-031-0/+3
| | | | llvm-svn: 251982
* Create lldbsuite.support package with `seven` file.Zachary Turner2015-11-022-0/+17
This file will be useful for filling in the gaps where `six` is missing some things we need. llvm-svn: 251847
OpenPOWER on IntegriCloud