| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
This is the conclusion of an effort to get LLDB's Python code
structured into a bona-fide Python package. This has a number
of benefits, but most notably the ability to more easily share
Python code between different but related pieces of LLDB's Python
infrastructure (for example, `scripts` can now share code with
`test`).
llvm-svn: 251532
|
|
|
|
| |
llvm-svn: 251444
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apparently there were tons of instances I missed last time, I
guess I accidentally ran 2to3 non-recursively. This should be
every occurrence of a print statement fixed to use a print function
as well as from __future__ import print_function being added to
every file.
After this patch print statements will stop working everywhere in
the test suite, and the print function should be used instead.
llvm-svn: 251121
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is necessary in order to allow third party modules to be
located under lldb/third_party rather than under the test
folder directly.
Since we're already touching every test file anyway, we also
go ahead and delete the unittest2 import and main block wherever
possible. The ability to run a test as a standalone file has
already been broken for some time, and if we decide we want this
back, we should use unittest instead of unittest2.
A few places could not have the import of unittest2 removed,because
they depend on the unittest2.expectedFailure or skip decorators.
Removing all those was orthogonal in spirit to the purpose of this
CL, so the import of unittest2 remains in those files that were
using it for its test decorators. Those can be addressed
separately.
llvm-svn: 251055
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently most of the test files have a separate dwarf and a separate
dsym test with almost identical content (only the build step is
different). With adding dwo symbol file handling to the test suit it
would increase this to a 3-way duplication. The purpose of this change
is to eliminate this redundancy with generating 2 test case (one dwarf
and one dsym) for each test function specified (dwo handling will be
added at a later commit).
Main design goals:
* There should be no boilerplate code in each test file to support the
multiple debug info in most of the tests (custom scenarios are
acceptable in special cases) so adding a new test case is easier and
we can't miss one of the debug info type.
* In case of a test failure, the debug symbols used during the test run
have to be cleanly visible from the output of dotest.py to make
debugging easier both from build bot logs and from local test runs
* Each test case should have a unique, fully qualified name so we can
run exactly 1 test with "-f <test-case>.<test-function>" syntax
* Test output should be grouped based on test files the same way as it
happens now (displaying dwarf/dsym results separately isn't
preferable)
Proposed solution (main logic in lldbtest.py, rest of them are test
cases fixed up for the new style):
* Have only 1 test fuction in the test files what will run for all
debug info separately and this test function should call just
"self.build(...)" to build an inferior with the right debug info
* When a class is created by python (the class object, not the class
instance), we will generate a new test method for each debug info
format in the test class with the name "<test-function>_<debug-info>"
and remove the original test method. This way unittest2 see multiple
test methods (1 for each debug info, pretty much as of now) and will
handle the test selection and the failure reporting correctly (the
debug info will be visible from the end of the test name)
* Add new annotation @no_debug_info_test to disable the generation of
multiple tests for each debug info format when the test don't have an
inferior
Differential revision: http://reviews.llvm.org/D13028
llvm-svn: 248883
|
|
|
|
|
|
|
| |
From: Ilia K <ki.stfu@gmail.com>
Differential Revision: http://reviews.llvm.org/D7066
llvm-svn: 226568
|
|
|
|
|
|
|
|
|
|
| |
"mydir" inside each test case.
This has led to many test suite failures because of copy and paste where new test cases were based off of other test cases and the "mydir" variable wasn't updated.
Now you can call your superclasses "compute_mydir()" function with "__file__" as the sole argument and the relative path will be computed for you.
llvm-svn: 196985
|
|
|
|
| |
llvm-svn: 185570
|
|
|
|
|
|
|
|
| |
- build fails due to PyCallable template definition inside an extern "C" scope
This commit reverts 185240, 184893 and 184608.
llvm-svn: 185560
|
|
|
|
|
|
|
|
|
|
| |
Now, the way SWIG wrappers call into Python is through a utility PyCallable object, which overloads operator () to look like a normal function call
Plus, using the SBTypeToSWIGWrapper() family of functions, we can call python functions transparently as if they were plain C functions
Using this new technique should make adding new Python call points easier and quicker
The PyCallable is a generally useful facility, and we might want to consider moving it to a separate layer where other parts of LLDB can use it
llvm-svn: 184608
|
|
|
|
| |
llvm-svn: 178595
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- make LLDB version number match Clang (and the Debian package)
- use the same revision detection magic that Clang uses to report SVN/Git revisions
- update test case as per above
Example output:
$ lldb -v
lldb version 3.3 (https://dmalea@llvm.org/svn/llvm-project/lldb/trunk revision 176211 clang revision 176208 llvm revision 176208)
ss
This line, and those below, will be ignored--
M source/lldb.cpp
M test/help/TestHelp.py
M source/Makefile
llvm-svn: 176268
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
issues with the previous implementation:
- no setting auto completion
- very manual and error prone way of getting/setting variables
- tons of code duplication
- useless instance names for processes, threads
Now settings can easily be defined like option values. The new settings makes use of the "OptionValue" classes so we can re-use the option value code that we use to set settings in command options. No more instances, just "does the right thing".
llvm-svn: 162366
|
|
|
|
|
|
|
|
| |
Make 'help arch' return the list of supported architectures.
Add a convenience method StringList::Join(const char *separator) which is called from the help function for 'arch'.
Also add a simple test case.
llvm-svn: 157507
|
|
|
|
|
|
|
|
|
|
| |
Correctly specify the LLDB_OPT_SET's that the 'shlib' command option belongs to by using a newly added macro like this:
#define LLDB_OPT_NOT_10 ( LLDB_OPT_SET_FROM(1, 10) & ~LLDB_OPT_SET_10 )
rdar://problem/11393864
llvm-svn: 156337
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
become a mutiword command
with subcommand 'expression' and 'variable'. The first subcommand is for supplying an expression to
be evaluated into an address to watch for, while the second is for watching a variable.
'watchpoint set expression' is a raw command, which means that you need to use the "--" option terminator
to end the '-w' or '-x' option processing and to start typing your expression.
Also update several test cases to comply and add a couple of test cases into TestCompletion.py,
in particular, test that 'watchpoint set ex' completes to 'watchpoint set expression ' and that
'watchpoint set var' completes to 'watchpoint set variable '.
llvm-svn: 150109
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(for watching of a variable) or
the '-e' option (for watching of an address) to be present.
Update some existing test cases with the required option and add some more test cases.
Since the '-v' option takes <variable-name> and the '-e' option takes <expr> as the command arg,
the existing infrastructure for generating the option usage can produce confusing help message,
like:
watchpoint set -e [-w <watch-type>] [-x <byte-size>] <variable-name | expr>
watchpoint set -v [-w <watch-type>] [-x <byte-size>] <variable-name | expr>
The solution adopted is to provide an extra member field to the struct CommandArgumentData called
(uint32_t)arg_opt_set_association, whose purpose is to link this particular argument data with some
option set(s). Also modify the signature of CommandObject::GetFormattedCommandArguments() to:
GetFormattedCommandArguments (Stream &str, uint32_t opt_set_mask = LLDB_OPT_SET_ALL)
it now takes an additional opt_set_mask which can be used to generate a filtered formatted command
args for help message.
Options::GenerateOptionUsage() impl is modified to call the GetFormattedCommandArguments() appropriately.
So that the help message now looks like:
watchpoint set -e [-w <watch-type>] [-x <byte-size>] <expr>
watchpoint set -v [-w <watch-type>] [-x <byte-size>] <variable-name>
rdar://problem/10703256
llvm-svn: 150032
|
|
|
|
|
|
| |
watchpt-id-list'.
llvm-svn: 140393
|
|
|
|
|
|
|
|
|
|
|
| |
--show-aliases (-a) shows aliases for commands, as well as built-in commands
--hide-user-defined (-u) hides user defined commands
by default 'help' without arguments does not show aliases anymore. to see them, add --show-aliases
to have only built-in commands appear, use 'help --hide-user-defined' ; there is currently no way to hide
built-in commands from the help output
'help command' is not changed by this commit, and help is shown even if command is an alias and -a is not specified
llvm-svn: 139377
|
|
|
|
|
|
|
|
| |
Apple Generic Version number
from the Xcode project file.
llvm-svn: 138677
|
|
|
|
|
|
| |
Add a simple test case for that.
llvm-svn: 138281
|
|
|
|
|
|
|
|
|
|
|
| |
lldb.
The reasom of the crash is because of a missing entry in the argument table corresponding to eArgTypeUnsignedInteger.
Add such entry and modify the call site of the crash to go through a fail-fast API to retrieve the argument table.
Add a regression test to TestHelp.py.
llvm-svn: 135206
|
|
|
|
|
|
|
| |
This is required to run the test suite outside of the source tree
or on a case sensitive file system.
llvm-svn: 133460
|
|
|
|
| |
llvm-svn: 130806
|
|
|
|
| |
llvm-svn: 130804
|
|
|
|
|
|
| |
matching failed.
llvm-svn: 122985
|
|
|
|
|
|
| |
number string as found in the resources/LLDB-info.plist file.
llvm-svn: 122930
|
|
|
|
|
|
| |
test case test_help_version().
llvm-svn: 122515
|
|
|
|
|
|
|
| |
1. 'help image du sym' is ambiguous.
2. 'help image du line' is not ambiguous.
llvm-svn: 120587
|
|
|
|
| |
llvm-svn: 120515
|
|
|
|
|
|
|
|
| |
test_help_image_dump_symtab_should_not_crash().
Possibly due to http://llvm.org/viewvc/llvm-project?rev=120484&view=rev.
llvm-svn: 120503
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update the expected match string.
o lldbtest.py:
Indicate when a command fails, even if there is nothing in the error stream.
o TestHelp.py:
Add a regression test case for 'help image dump symtab'.
o CommandObjectHelp.cpp:
Some of the logic branches with successful help command results were not tagged
with a Success Status. They are fixed now. This is important for Python
interaction.
llvm-svn: 116062
|
|
|
|
|
|
|
|
| |
term-width 0"
after the recent checkin.
llvm-svn: 113206
|
|
|
|
| |
llvm-svn: 112732
|
|
|
|
| |
llvm-svn: 111671
|
|
|
|
| |
llvm-svn: 111536
|
|
|
|
|
|
|
|
|
| |
cleanup before finish into the test fixture in lldbtest.TestBase.tearDown().
Derivatives of TestBase is responsible for setting self.runStarted to True if an
inferior process has been started.
llvm-svn: 111188
|
|
|
|
|
|
| |
Added a generic message generator to the lldbtest.py base module.
llvm-svn: 110625
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
backported to Python 2.3+. Some of the features desired include better
verbose reporting in unittest2.TextTestRunner and decorator support for
skipping tests and expected failures.
http://pypi.python.org/pypi/unittest2
o Modified the existing .py tests to use unittest2 and decorated
TestSTL.test_step_into_stl(), which is known to always fail currently, with
@unittest2.expectedFailure.
llvm-svn: 110397
|
|
|
|
|
|
|
| |
because unittest.main() calls sys.exit() before returning. Fixed by registering
an exit handler for this situation.
llvm-svn: 110379
|
|
|
|
| |
llvm-svn: 110066
|
|
|
|
|
|
|
|
|
|
|
| |
module lldbtest.py and refactored the existing test cases to derive from the
abstract base class lldbtest.TestBase.
MOdified the test driver (dotest.py and dotest.pl) to set up additional
PYTHONPATH component for locating the lldbtest module, which sits in the same
directory.
llvm-svn: 107563
|
|
|
|
|
|
|
|
|
| |
is defined. Use ${LLDB_LOG} to specify the log file.
Create a singleton SBDebugger in the lldb namespace, that gets used when running
the entire test suite.
llvm-svn: 107445
|
|
|
|
|
|
|
| |
this seems to alleviate the intermittent failure observed while running the
whole test suite.
llvm-svn: 107357
|
|
|
|
| |
llvm-svn: 107221
|
|
|
|
|
|
|
| |
Also modified dotest.py so that it sets the LLDB_TEST environment variable
so that individual test cases can locate their supporting files correctly.
llvm-svn: 107220
|
|
|
|
|
|
|
|
| |
lldb.SBDebugger.Initialize()/Terminate() pair.
Change TestHelp.py to use synchronous debugging, which is easier to work with.
llvm-svn: 107198
|
|
|
|
|
|
| |
shell and issuing 'help' would hang (was actually infinitely looping).
llvm-svn: 107066
|
|
llvm-svn: 106909
|