Age | Commit message (Collapse) | Author |
|
file unless told otherwise.
Set up self.lldbOption to be "--no-lldbibit" unless env variable NO_LLDBIBIT is defined and equals "NO".
Also add "-nx" to gdb spawned.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141384 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Add a keyword argument 'endstr' to TestBase.expect() method to assert that the output
will end with 'endstr'.
Add TestBase.switch_to_thread_with_stop_reason(stop_reason) to select the thread with
the stop reason = 'stop_reason' as the current thread.
o TestWatchLocation.py:
Modified to switch to the stopped thread with stop reason = watchpoint and to evaluate
an expression with expected output for stronger assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140890 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
watchpoint hit events.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139847 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
executable
built locally from the source tree. This is distinguished from self.lldbExec, which
can be used by test/benchmarks to measure the performances against other debuggers.
You can use environment variable LLDB_EXEC to specify self.lldbExec to the dotest.py
test driver, otherwise it is going to be populated with self.lldbHere.
Modify the regular tests under test dir, i.e., not test/benchmarks, to use self.lldbHere.
Also modify the benchmarks tests to use self.lldbHere when it needs an 'lldb' executable
with debug info to do the performance measurements.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138608 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138466 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
failure, re-raise
the exception to get more stack trace information.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138021 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
test_step_over_3_times_with_dsym/dwarf()
test cases in TestThreadAPI.py by decorating it with @expectedFailureClang.
Example:
@expectedFailureClang
@python_api_test
def test_step_over_3_times_with_dwarf(self):
"""Test Python SBThread.StepOver() API."""
# We build a different executable than the default buildDwarf() does.
d = {'CXX_SOURCES': 'main2.cpp', 'EXE': self.exe_name}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.step_over_3_times(self.exe_name)
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138019 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137776 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
...
File "/Volumes/data/lldb/svn/trunk/test/lldbtest.py", line 243, in __init__
self.session = test.session if test else None
AttributeError: 'StdCXXDisassembleTestCase' object has no attribute 'session'
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137724 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137696 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
tests were skipped
due to incorrect skip-logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137678 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
was changed during the debug session.
First, main.c causes a crash, the inferior then gets re-built with main2.c which is not crashing.
Add Base.cleanup(self, dictionary=None) for platform specfic way to do cleanup after build.
This plugin method is used by the above test case to cleanup the main.c build before rebuild for main2.c.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137500 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
option instead of the '-t' option.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137285 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Add the rich comparison methods (__eq__, __ne__) to SBType, too.
o lldbtest.py:
Add debug utility method TestBase.DebugSBType().
o test/python_api/type:
Add tests for exercising SBType/SBTypeList API, including the SBTarget.FindTypes(type_name)
API which returns a SBTypeList matching the type_name.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136975 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
evaluations.
Modify lldbbench.py so that lldbtest.line_number() utility function is available to
BenchBase client as just line_number(), and modify lldbtest.py so that self.lldbExec
(the full path for the 'lldb' executable) is available to BenchBase client as well.
An example run of the test case on my MacBook Pro running Lion:
1: test_compare_lldb_to_gdb (TestRepeatedExprs.RepeatedExprsCase)
Test repeated expressions with lldb vs. gdb. ...
lldb_avg: 0.204339
gdb_avg: 0.205721
lldb_avg/gdb_avg: 0.993284
ok
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136740 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Modify the example TestRepeatedExprs.py to use BenchBase, instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136649 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136641 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
lldbtest.Base class,
while its API clients remain unchanged. The new lldbtest.Base class is to capture common behaviors
when working with the test driver to accomplish things. The clients of lldbtest.Base can be
lldb command line and api tests as well as other generic tests like a benchmark test.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136636 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
benchmarks test.
The test driver now takes an option "+b" which enables to run just the benchmarks tests.
By default, tests decorated with the @benchmarks_test decorator do not get run.
Add an example benchmarks test directory which contains nothing for the time being,
just to demonstrate the @benchmarks_test concept.
For example,
$ ./dotest.py -v benchmarks
...
----------------------------------------------------------------------
Collected 2 tests
1: test_with_gdb (TestRepeatedExprs.RepeatedExprssCase)
Test repeated expressions with gdb. ... skipped 'benchmarks tests'
2: test_with_lldb (TestRepeatedExprs.RepeatedExprssCase)
Test repeated expressions with lldb. ... skipped 'benchmarks tests'
----------------------------------------------------------------------
Ran 2 tests in 0.047s
OK (skipped=2)
$ ./dotest.py -v +b benchmarks
...
----------------------------------------------------------------------
Collected 2 tests
1: test_with_gdb (TestRepeatedExprs.RepeatedExprssCase)
Test repeated expressions with gdb. ... running test_with_gdb
benchmarks result for test_with_gdb
ok
2: test_with_lldb (TestRepeatedExprs.RepeatedExprssCase)
Test repeated expressions with lldb. ... running test_with_lldb
benchmarks result for test_with_lldb
ok
----------------------------------------------------------------------
Ran 2 tests in 0.270s
OK
Also mark some Python API tests which are missing the @python_api_test decorator.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136553 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
o GetChildAtIndex, and
o GetValueForExpressionPath
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135315 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
inferior process
before issuing API calls to find the global variable and to get its value.
rdar://problem/9700873 has been updated to reflect the latest status. The dwarf case
now does not seg fault if the inferior is not started; instead, for dwarf case, the
value retrieved from the global variable is None.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134909 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Test "print object" where another thread blocks the print object from making progress.
Set a breakpoint on the line in my_pthread_routine. Then switch threads
to the main thread, and do print the lock_me object. Since that will
try to get the lock already gotten by my_pthread_routime thread, it will
have to switch to running all threads, and that should then succeed.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133933 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Assign the test method name to self.testMethodName. This can be useful for the
test directory (see test/types for a good example) which houses a bunch of executables
compiled from different source files. The default build action is to create a.out as
the binary executable, which can confuse the module cacheing mechanism and result in
the debugger getting a stale image as the target to be debugged, and chaos ensues.
o AbstractBase.py, TestThreadAPI.py:
Use self.testMethodName to our advantage.
o TestLoadUnload.py:
Add expected failure marker to test case test_modules_search_paths().
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133768 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
directory
if not already specified by the test driver (via ./dotest -w). Remove the AbstractBase.setUp()
method definition when/if we find out the cause of the failures if no delays are inserted
between these test cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133495 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133457 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
TestBase.runCmd() and
remove the self.runStarted attribute since the automatic shutdown of processes associated
with the targets are now performed automatically.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133092 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
bool SBDebugger::DeleteTarget(lldb::SBTarget &target);
which is used in the test tearDown() phase to cleanup the debugger's target list
so that it won't grow larger and larger as test cases are executed. This is also
a good opportunity to get rid of the arcane requirement that test cases exercising
the Python API must assign the process object to self.process so that it gets
shutdown gracefully. Instead, the shutdown of the process associated with each
target is now being now automatically.
Also get rid of an API from SBTarget class:
SBTarget::DeleteTargetFromList(lldb_private::TargetList *list);
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133091 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
simplify our base class.
It was introduced to work around some debugger infrastructure bug which has long since been fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132951 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132692 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
attribute references
inside a try-except block in case the test is not invoked through the dotest.py test driver.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132372 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132367 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132232 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Remove an unnecessary __import__() function call.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132231 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132072 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131035 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
into a unique file.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131011 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130965 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130963 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130960 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
o lldb.debugger
o lldb.target
o lldb.process
o lldb.thread
o lldb.frame
"just works" when we stop at a breakpoint.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130904 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
test execution using pexpect.
Change some child.expect() to child.expect_exact() as they try to match the string, not a regular expression.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130797 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
hooks.
Change one test sequence to detect the '** End Stop Hooks **' marker emitted by the
stop hooks mechanism and check for whether the 'expr ptr' stop-hook has been run.
Also, change the TestBase.tearDown() to wait for 2 seocnds before forcefully kill
the pexpect-spawned child lldb process.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130767 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
be consistent.
And modify the test cases accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130314 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
TestAbbreviations.py
and TestAliases.py. Pass the keyword argument 'check=False' to:
self.runCmd("script my.date()", check=False)
since we want to restore sys.stdout no matter what the outcome of the runCmd is.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129949 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129786 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
currently in trace mode (-t to dotest.py), i.e., tracing the lldb command execution.
Change TestInferiorCrashing.inferior_crashing_python(self) to check this flag in
order to print the stack trace of the inferior thread.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129785 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
"target select" commands.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129717 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
http://llvm.org/viewvc/llvm-project?view=rev&revision=129542.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129574 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
rdar://problem/9173060 lldb hangs while running unique-types
disappears if running with clang version >= 3. Modify the TestUniqueTypes.py
to detect if we are running with clang version < 3 and, if true, skip the test.
Update the lldbtest.system() function to return a tuple of (stdoutdata, stderrdata)
since we need the stderr data from "clang -v" command. Modify existing clients of
lldbtest.system() to now use, for example:
# First, capture the golden output emitted by the oracle, i.e., the
# series of printf statements.
- go = system("./a.out", sender=self)
+ go = system("./a.out", sender=self)[0]
# This golden list contains a list of (variable, value) pairs extracted
# from the golden output.
gl = []
And add two utility functions to lldbutil.py.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128162 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
command.
This uses pexpect module to spawn a 'lldb' program and uses pseudo-TTY to talk to
the child application.
The test cases test setting breakpoints, adding a stop-hook with line range, and
verifies that when the inferior stops, the stop-hook will fire off when it is
within range and will not fire off when it is out of range.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127519 91177308-0d34-0410-b5e6-96231b3b80d8
|