[NFC] This patch replaces master and slave with primary and secondary
respectively when referring to pseudoterminals/file descriptors.
Reviewed By: clayborg, teemperor
Differential Revision: https://reviews.llvm.org/D113687
Test dependent on pexpect fail randomly with timeouts on Arm/AArch64 Linux
buildbots. I am setting pexpect timeout from 30 to 60.
I will revert this back if this doesnt improve random failures.
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
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
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
*** 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
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
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
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
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
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
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
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