Commit Graph

20 Commits

Author SHA1 Message Date
Adrian Prantl a8419b1f27 Increase timeout in pexpect to lower chances of tests failing under ASAN.
If this doesn't actually work, I'll revert the change and just disable
the remaining thee pexpect tests under asan.

llvm-svn: 374375
2019-10-10 16:16:49 +00:00
Jonas Devlieghere e021d69094 dotest.py: bugfix: test filters with -f do not work on Python3
dotest -f does not work on Python3.

The name types.UnboundMethodType was an alias for types.MethodType in
2.7, but it does not exist in python3. MethodType works in both.

Also the actual type returned from SomeClass.some_method in python3
will be types.Function, not MethodType.

Patch by: Lawrence D'Anna

Differential revision: https://reviews.llvm.org/D67791

llvm-svn: 372441
2019-09-20 23:41:29 +00:00
Aaron Smith 5146a9ea5d Initial support for native debugging of x86/x64 Windows processes
Summary: Thanks to Hui Huang and the reviewers for all the help with this patch.

Reviewers: labath, Hui, jfb, clayborg, amccarth

Reviewed By: labath

Subscribers: amccarth, compnerd, dexonsmith, mgorny, jfb, teemperor, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D63165

llvm-svn: 368759
2019-08-13 22:18:01 +00:00
Davide Italiano 4be269e604 [lldb/thirdparty] Remove unneeded files, asked by Jonas.
llvm-svn: 355969
2019-03-12 20:41:36 +00:00
Davide Italiano 205fd03a27 [third-party] Update pexpect to 4.6.
Reviewers: labath, jdevlieghere

Subscribers: lldb-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D59159

llvm-svn: 355967
2019-03-12 20:41:24 +00:00
Jonas Devlieghere dcc8fc9e98 [dotest] Consider unexpected passes as failures.
Unexpected successes should be considered failures because they can hide
regressions when not addressed. When a test is fixed and not re-enabled,
it can easily regress without us noticing.

I couldn't find a good way to make this change other than changing it in
the unittest2 framework. I know this is less than optimal but since we
have the dependency checked in and the change is pretty fundamental to
the framework I think it's not unreasonable.

Differential revision: https://reviews.llvm.org/D55835

llvm-svn: 349818
2018-12-20 20:44:23 +00:00
Kate Stone b9c1b51e45 *** This commit represents a complete reformatting of the LLDB source code
*** to conform to clang-format’s LLVM style.  This kind of mass change has
*** two obvious implications:

Firstly, merging this particular commit into a downstream fork may be a huge
effort.  Alternatively, it may be worth merging all changes up to this commit,
performing the same reformatting operation locally, and then discarding the
merge for this particular commit.  The commands used to accomplish this
reformatting were as follows (with current working directory as the root of
the repository):

    find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} +
    find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ;

The version of clang-format used was 3.9.0, and autopep8 was 1.2.4.

Secondly, “blame” style tools will generally point to this commit instead of
a meaningful prior commit.  There are alternatives available that will attempt
to look through this change and find the appropriate prior commit.  YMMV.

llvm-svn: 280751
2016-09-06 20:57:50 +00:00
Zachary Turner 6c29ca7dd0 Put progress.py back, apparently this can't be deleted.
llvm-svn: 255159
2015-12-09 21:32:28 +00:00
Zachary Turner 94ea56bc8b Remove the -P option from dotest.py
This was an option to display a graphical progress bar.  Nobody
is using this, and it doesn't work correctly anyway with the new
result formatter.

llvm-svn: 255153
2015-12-09 20:48:59 +00:00
Zachary Turner 059e52c44c Python 3 - Fix some issues with class / instance variables in unittest2.
Explanation from a Python wizard (not me) about why this exhibited
different behavior under Python 2 and Python 3.

    `cmp` is a builtin_function_or_method in Python 2.7, which doesn't
    have a __get__ and doesn't qualify as a "descriptor".  Your lambda is a
    regular function which qualifies as a descriptor whose __get__ method
    returns a bound instance.

His suggested fix was to write

    sortTestMethodsUsing = staticmethod(cmp_)

However, I don't think `sortTestMethodsUsing` (or any of the other fields
of `TestLoader`) should be class attributes anyway.  They are all accessed
through self, so they should be instance attributes.  So the fix employed
here is to convert them to instance attributes.

Differential Revision: http://reviews.llvm.org/D14453
Reviewed By: Todd Fiala

llvm-svn: 252346
2015-11-06 21:37:07 +00:00
Zachary Turner 71d468be66 Python 3 - Fix usage of `unicode` in unittest2.
llvm-svn: 252189
2015-11-05 19:21:56 +00:00
Zachary Turner cc8aa4f619 Python 3 - Apply 2to3 `filter` fixer to unittest2.
llvm-svn: 252181
2015-11-05 18:38:02 +00:00
Zachary Turner 46f1784bac Python 3 - Fix checking of string types in unittest2 module.
This patch actually introduces a dependency from unittest2 to
six.  This should be ok since both packages are in our own
repo, and we assume a sys.path of the top-level script that
can find the third party packages.  So unittest2 should be
able to find six.

llvm-svn: 251983
2015-11-03 21:37:42 +00:00
Zachary Turner 234860133b Python 3 - Fix some issues in unittest2.
unittest2 was using print statements in a few places, and also
using the `cmp` function (which is removed in Python 3).  Again,
we need to stop using unittest2 and using unittest instead, but
this seems like an easier route for now.

llvm-svn: 251978
2015-11-03 21:02:00 +00:00
Zachary Turner 9618980a19 Python 3: Modernize exception raising syntax.
Old-style: `raise foo, bar`
New-style: `raise foo(bar)`

These two statements are equivalent, but the former is an error in
Python 3.

llvm-svn: 251977
2015-11-03 21:01:45 +00:00
Zachary Turner c07138f6a0 Python 3 - modernize exception catching syntax.
Old-style syntax:  `except Exception, e:`
New-style syntax:  `except Exception as e:`

These two statements are identical, except that the former has
been deprecated for may versions, and was removed in Python 3.

This converts everything to use the new syntax (which also works
in Python 2).  I had to convert unittest2 as well.  What we really
need to do is just delete unittest2, and use unittest instead since
it is a standard module that ships with every Python distribution.
But this is the path of least resistance for now, although at
some point we will really need to do it.

llvm-svn: 251968
2015-11-03 19:49:05 +00:00
Zachary Turner af383ff70c Preparation for turning lldbsuite into a Python package.
The idea behind this patch is to expose the meat of
LLDB's Python infrastructure (test suite, scripts, etc)
as a single package.  This makes reusability and code
sharing among sub-packages easy.

Differential Revision: http://reviews.llvm.org/D14131

llvm-svn: 251460
2015-10-27 22:33:47 +00:00
Zachary Turner 0a0490b152 Rename `lldb_shared` to `use_lldb_suite`.
llvm-svn: 251444
2015-10-27 20:12:05 +00:00
Zachary Turner 746bb5e457 Move third party libraries to lldb/third_party
llvm-svn: 251046
2015-10-22 19:55:01 +00:00
Zachary Turner 4718944d50 Add `six` Python module to lldb/third_party.
Six is a python module designed to smooth the process of porting
Python 2 code to Python 3.  Specifically, six provides a consistent
interface to some of the breaking changes between 2 and 3.  For example,
the syntax for assigning a metaclass differs in Python 2 and 3.  Six
addresses this by providing a single class decorator that will do the
right thing depending on which version of Python is being run.

There are other examples too, such as dealing with renamed modules,
unicode literals, etc.

llvm-svn: 250857
2015-10-20 21:05:49 +00:00