summaryrefslogtreecommitdiffstats
path: root/lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* remove multi-argument form of PythonObject::Reset()Lawrence D'Anna2019-10-221-1/+0
| | | | | | | | | | | | | | | | | | | | Summary: With this patch, only the no-argument form of `Reset()` remains in PythonDataObjects. It also deletes PythonExceptionState in favor of PythonException, because the only call-site of PythonExceptionState was also using Reset, so I cleaned up both while I was there. Reviewers: JDevlieghere, clayborg, labath, jingham Reviewed By: labath Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69214 llvm-svn: 375475
* Convert FileSystem::Open() to return Expected<FileUP>Lawrence D'Anna2019-09-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch converts FileSystem::Open from this prototype: Status Open(File &File, const FileSpec &file_spec, ...); to this one: llvm::Expected<std::unique_ptr<File>> Open(const FileSpec &file_spec, ...); This is beneficial on its own, as llvm::Expected is a more modern and recommended error type than Status. It is also a necessary step towards https://reviews.llvm.org/D67891, and further developments for lldb_private::File. Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: labath Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67996 llvm-svn: 373003
* [CMake] Only the Python scirpt interpreter should link against Python.Jonas Devlieghere2019-04-011-3/+1
| | | | | | This patch removes spurious links against Python. llvm-svn: 357431
* [Python] Define empty SWIG wrapper for unit testin"Jonas Devlieghere2019-03-261-1/+1
| | | | | | | | | The python plugin uses wrappers generated by swig. For the symbols to be available, we'd need to link against liblldb, which is not an option because the symbols could conflict with the static library we are testing. Instead we define the symbols ourselves in the unit test. llvm-svn: 356971
* [Python] Move SWIG wrapper dependency into the pluginJonas Devlieghere2019-03-251-1/+1
| | | | | | This should fix the Windows bot (fingers crossed). llvm-svn: 356967
* [CMake] Update unit tests with accurate dependenciesChris Bieneman2017-02-011-2/+7
| | | | | | This is extending the updates from r293696 to the LLDB unit tests. llvm-svn: 293821
* Introduce a `PythonExceptionState` class.Zachary Turner2015-11-131-0/+1
| | | | | | | | | | | | This is a helper class which supports a number of features including exception to string formatting with backtrace handling and auto-restore of exception state upon scope exit. Additionally, unit tests are included to verify the feature set of the class. llvm-svn: 252994
* gtest - Make a `PythonTestSuite` base class for setup / teardown.Zachary Turner2015-11-131-0/+1
| | | | | | | | This allows other potential unit test suites (of which one is forthcoming in a subsequent patch) to re-use the same initialization and teardown of the GIL. llvm-svn: 252993
* Port native Python-API to 3.xZachary Turner2015-10-091-0/+6
With this change, liblldb is 95% of the way towards being able to work under both Python 2.x and Python 3.x. This should introduce no functional change for Python 2.x, but for Python 3.x there are some important changes. Primarily, these are: 1) PyString doesn't exist in Python 3. Everything is a PyUnicode. To account for this, PythonString now stores a PyBytes instead of a PyString. In Python 2, this is equivalent to a PyUnicode, and in Python 3, we do a conversion from PyUnicode to PyBytes and store the PyBytes. 2) PyInt doesn't exist in Python 3. Everything is a PyLong. To account for this, PythonInteger stores a PyLong instead of a PyInt. In Python 2.x, this requires doing a conversion to PyLong when creating a PythonInteger from a PyInt. In 3.x, there is no PyInt anyway, so we can assume everything is a PyLong. 3) PyFile_FromFile doesn't exist in Python 3. Instead there is a PyFile_FromFd. This is not addressed in this patch because it will require quite a large change to plumb fd's all the way through the system into the ScriptInterpreter. This is the only remaining piece of the puzzle to get LLDB supporting Python 3.x. Being able to run the test suite is not addressed in this patch. After the extension module can compile and you can enter an embedded 3.x interpreter, the test suite will be addressed in a followup. llvm-svn: 249886
OpenPOWER on IntegriCloud