Commit Graph

31 Commits

Author SHA1 Message Date
Sean Callanan 05834cd2ad Reversed r238363, because the message is inconsistent
with all the other assertion messages.

llvm-svn: 241212
2015-07-01 23:56:30 +00:00
Chaoren Lin 52cf8ecc23 Check before using platform specific attributes.
Summary: `os.uname` in TestUniversal and `os.geteuid` in TestTerminal.

Reviewers: clayborg, zturner

Subscribers: lldb-commits

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

llvm-svn: 239135
2015-06-05 06:28:43 +00:00
Siva Chandra 3154aa23f3 [TestBase.runCmd] Better error message when runCmd fails.
Summary:
Before:
    AssertionError: False is not True : Process is launched successfully

After:
    AssertionError: False is not True : Command 'run a.out' failed.
    >>> error: invalid target, create a target using the 'target create' command
    >>> Process could not be launched successfully

Reviewers: clayborg

Reviewed By: clayborg

Subscribers: lldb-commits, vharron

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

llvm-svn: 238363
2015-05-27 22:27:41 +00:00
Robert Flack 13c7ad9cd2 Replace sys.platform skips in tests with @skip decorators which check against remote platform.
Adds @skipIfPlatform and @skipUnlessPlatform decorators which will skip if /
unless the target platform is in the provided platform list.

Test Plan:
ninja check-lldb shows no regressions.
When running cross platform, tests which cannot run on the target platform are
skipped.

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

llvm-svn: 233547
2015-03-30 14:12:17 +00:00
Zachary Turner 7d186c0152 Remove shell-globbing from all test makefiles.
llvm-svn: 214441
2014-07-31 21:03:11 +00:00
Greg Clayton c694751a06 Correctly set the working directory when launching processes for both local and remote targets.
llvm-svn: 197266
2013-12-13 19:18:59 +00:00
Greg Clayton 4570d3eba0 Massive test suite cleanup to stop everyone from manually having to compute "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
2013-12-10 23:19:29 +00:00
Daniel Malea e0f8f574c7 merge lldb-platform-work branch (and assorted fixes) into trunk
Summary:
    This merge brings in the improved 'platform' command that knows how to
    interface with remote machines; that is, query OS/kernel information, push
    and pull files, run shell commands, etc... and implementation for the new
    communication packets that back that interface, at least on Darwin based
    operating systems via the POSIXPlatform class. Linux support is coming soon.

    Verified the test suite runs cleanly on Linux (x86_64), build OK on Mac OS
    X Mountain Lion.

    Additional improvements (not in the source SVN branch 'lldb-platform-work'):
    - cmake build scripts for lldb-platform
    - cleanup test suite
    - documentation stub for qPlatform_RunCommand
    - use log class instead of printf() directly
    - reverted work-in-progress-looking changes from test/types/TestAbstract.py that work towards running the test suite remotely.
    - add new logging category 'platform'

    Reviewers: Matt Kopec, Greg Clayton

    Review: http://llvm-reviews.chandlerc.com/D1493

llvm-svn: 189295
2013-08-26 23:57:52 +00:00
Jim Ingham 63dfc725a7 Fix all the test case breakages caused by folks writing tests all over the place that depended explicitly
on the output of "break set".  Please don't do this sort of thing!!!!!

llvm-svn: 164433
2012-09-22 00:05:11 +00:00
Greg Clayton 7051231709 <rdar://problem/11358639>
Switch over to the "*-apple-macosx" for desktop and "*-apple-ios" for iOS triples.

Also make the selection process for auto selecting platforms based off of an arch much better.

llvm-svn: 156354
2012-05-08 01:45:38 +00:00
Johnny Chen 7840c81df2 Modify a couple of Makefiles to use clang instead of gcc, since gcc is being deprecated.
llvm-svn: 148071
2012-01-12 23:50:28 +00:00
Johnny Chen fc7483f699 Add a simple test case to exercise the SBDebugger.CreateTargetWithFileAndTargetTriple() API.
llvm-svn: 137544
2011-08-13 00:55:56 +00:00
Johnny Chen f017e8d6d7 Modify the skipUnless() logic to work for OSX Lion.
llvm-svn: 137542
2011-08-13 00:27:46 +00:00
Johnny Chen 4ebd019b97 Now that we have added a post-processing step for adding truth value testing to
those lldb objects which implement the IsValid() method, let's change the rest of
the test suite to use the more compact truth value testing pattern (the Python way).

llvm-svn: 131970
2011-05-24 18:22:45 +00:00
Johnny Chen b21c52eac8 Add test scenario to verify 'eax' register is available when launching the i386 slice
of a universal binary and 'rax' register is available when launching the x86_64 slice.

rdar://problem/9403437

llvm-svn: 131069
2011-05-08 17:25:27 +00:00
Johnny Chen 933fefdd6a Add new radar info for failed test.
llvm-svn: 125100
2011-02-08 18:37:49 +00:00
Johnny Chen 78bb926f9b Make the assertion message about 32-bit process address byte size more clear.
llvm-svn: 125099
2011-02-08 18:31:06 +00:00
Johnny Chen 769302a97f Parametrize make variable CC to also test with clang.
llvm-svn: 124764
2011-02-03 00:44:32 +00:00
Johnny Chen d6c05708eb Remove @expectedFailure decorator as the bug has been fixed.
llvm-svn: 120624
2010-12-01 23:15:58 +00:00
Johnny Chen c7c03d919a Add @expectedFailure decorator for a known bug:
rdar://problem/8689814 test failure: test/macosx/universal (the i386 slice does not break?)

llvm-svn: 120505
2010-12-01 00:03:17 +00:00
Johnny Chen 98d9c79e7d Make the specification of relative directory more robust.
llvm-svn: 118511
2010-11-09 17:09:20 +00:00
Johnny Chen aadcef54de Make calling the super class's setUp() method less fragile.
llvm-svn: 116490
2010-10-14 17:31:24 +00:00
Johnny Chen 0924b41201 Avoid using hardcoded line number to break on. Use the line_number() utility
function to get the line number to break on during setUp().

llvm-svn: 116356
2010-10-12 22:39:52 +00:00
Johnny Chen 1b1b9accd1 Marked test_process_launch_for_universal() test case as requiring 'darwin' and 'i386'
in order to be run.  And added a default build phase at the beginning of the method.

llvm-svn: 113037
2010-09-03 23:49:16 +00:00
Johnny Chen cbb4be0c93 Changed the test case class names to be noun-like instead of verb-like.
llvm-svn: 112732
2010-09-01 19:59:58 +00:00
Johnny Chen 5ee881948a Added a test case test_breakpoint_creation_by_filespec_python() which creates a
breakpoint by FileSpec and line number and exercises some FileSpec APIs.

Also, RUN_STOPPED is a bad assert name, RUN_SUCCEEDED is better.

llvm-svn: 112327
2010-08-27 23:47:36 +00:00
Johnny Chen bf325e4a37 Changed from dbg.GetCurrentTarget() to dbg.GetSelectedTarget().
llvm-svn: 112231
2010-08-26 22:06:03 +00:00
Johnny Chen f3c59231b3 Added logic to TestUniversal.py to exercise the python APIs:
o SBDebugger.GetCurrentTarget()
o SBTarget.GetProcess()
o SBProcess.GetAddressByteSize()

in order to make sure that, indeed, 64-bit, followed by 32-bit processes have
been launched.

Added invoke() method to TestBase to factor in the tracing logic in one place.
This method allows an object to call a method with no arg reflectively.

llvm-svn: 112102
2010-08-25 22:52:45 +00:00
Johnny Chen 536b7d2d26 Removed the @unitest2.expectedFailure decorator. The i386 process launch works
correctly after all.  It was my own configuration error (I was building x86_64
only).

llvm-svn: 111992
2010-08-24 23:14:47 +00:00
Johnny Chen 3c884a014c Added a test for launching a universal binary. Launch of i386 architecture
currently fails: rdar://problem/8349784.

Forgot to check in lldbtest.py in the previous commit r111958.

llvm-svn: 111975
2010-08-24 22:07:56 +00:00
Jim Ingham 4512065130 Test files (but no test cases yet) for handling Universal files.
llvm-svn: 110893
2010-08-12 01:21:40 +00:00