Skip to content
  1. Dec 22, 2011
  2. Dec 03, 2011
  3. Nov 17, 2011
    • Johnny Chen's avatar
      Add an option '-S' to skip the build and cleanup while running the test. · 0fddfb2c
      Johnny Chen authored
      Use this option with care as you would need to build the inferior(s) by hand
      and build the executable(s) with the correct name(s).  This option can be used
      with '-# n' to stress test certain test cases for n number of times.
      
      An example:
      
      [11:55:11] johnny:/Volumes/data/lldb/svn/trunk/test/python_api/value $ ls
      Makefile		TestValueAPI.pyc	linked_list
      TestValueAPI.py		change_values		main.c
      [11:55:14] johnny:/Volumes/data/lldb/svn/trunk/test/python_api/value $ make EXE=test_with_dsym
      clang -gdwarf-2 -O0  -arch x86_64   -c -o main.o main.c
      clang -gdwarf-2 -O0  -arch x86_64   main.o -o "test_with_dsym"
      /usr/bin/dsymutil  -o "test_with_dsym.dSYM" "test_with_dsym"
      [11:55:20] johnny:/Volumes/data/lldb/svn/trunk/test/python_api/value $ cd ../..
      [11:55:24] johnny:/Volumes/data/lldb/svn/trunk/test $ ./dotest.py -v -# 10 -S -f ValueAPITestCase.test_with_dsym
      LLDB build dir: /Volumes/data/lldb/svn/trunk/build/Debug
      LLDB-89
      Path: /Volumes/data/lldb/svn/trunk
      URL: https://johnny@llvm.org/svn/llvm-project/lldb/trunk
      Repository Root: https://johnny@llvm.org/svn/llvm-project
      Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8
      Revision: 144914
      Node Kind: directory
      Schedule: normal
      Last Changed Author: gclayton
      Last Changed Rev: 144911
      Last Changed Date: 2011-11-17 09:22:31 -0800 (Thu, 17 Nov 2011)
      
      
      
      Session logs for test failures/errors/unexpected successes will go into directory '2011-11-17-11_55_29'
      Command invoked: python ./dotest.py -v -# 10 -S -f ValueAPITestCase.test_with_dsym
      ----------------------------------------------------------------------
      Collected 1 test
      
      1: test_with_dsym (TestValueAPI.ValueAPITestCase)
         Exercise some SBValue APIs. ... ok
      
      ----------------------------------------------------------------------
      Ran 1 test in 1.163s
      
      OK
      1: test_with_dsym (TestValueAPI.ValueAPITestCase)
         Exercise some SBValue APIs. ... ok
      
      ----------------------------------------------------------------------
      Ran 1 test in 0.200s
      
      OK
      1: test_with_dsym (TestValueAPI.ValueAPITestCase)
         Exercise some SBValue APIs. ... ok
      
      ----------------------------------------------------------------------
      Ran 1 test in 0.198s
      
      OK
      1: test_with_dsym (TestValueAPI.ValueAPITestCase)
         Exercise some SBValue APIs. ... ok
      
      ----------------------------------------------------------------------
      Ran 1 test in 0.199s
      
      OK
      1: test_with_dsym (TestValueAPI.ValueAPITestCase)
         Exercise some SBValue APIs. ... ok
      
      ----------------------------------------------------------------------
      Ran 1 test in 0.239s
      
      OK
      1: test_with_dsym (TestValueAPI.ValueAPITestCase)
         Exercise some SBValue APIs. ... ok
      
      ----------------------------------------------------------------------
      Ran 1 test in 1.215s
      
      OK
      1: test_with_dsym (TestValueAPI.ValueAPITestCase)
         Exercise some SBValue APIs. ... ok
      
      ----------------------------------------------------------------------
      Ran 1 test in 0.105s
      
      OK
      1: test_with_dsym (TestValueAPI.ValueAPITestCase)
         Exercise some SBValue APIs. ... ok
      
      ----------------------------------------------------------------------
      Ran 1 test in 0.098s
      
      OK
      1: test_with_dsym (TestValueAPI.ValueAPITestCase)
         Exercise some SBValue APIs. ... ok
      
      ----------------------------------------------------------------------
      Ran 1 test in 0.195s
      
      OK
      1: test_with_dsym (TestValueAPI.ValueAPITestCase)
         Exercise some SBValue APIs. ... ok
      
      ----------------------------------------------------------------------
      Ran 1 test in 1.197s
      
      OK
      [11:55:34] johnny:/Volumes/data/lldb/svn/trunk/test $ 
      
      llvm-svn: 144919
      0fddfb2c
  4. Nov 16, 2011
  5. Oct 19, 2011
  6. Oct 07, 2011
  7. Sep 30, 2011
    • Johnny Chen's avatar
      o lldbtest.py: · 86268e44
      Johnny Chen authored
      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.
      
      llvm-svn: 140890
      86268e44
  8. Sep 15, 2011
  9. Aug 26, 2011
    • Johnny Chen's avatar
      Add a new attribute self.lldbHere, representing the fullpath to the 'lldb' executable · d890bfc9
      Johnny Chen authored
      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.
      
      llvm-svn: 138608
      d890bfc9
  10. Aug 24, 2011
  11. Aug 19, 2011
  12. Aug 17, 2011
  13. Aug 16, 2011
  14. Aug 12, 2011
    • Johnny Chen's avatar
      Add TestInferiorChanged.py to test that lldb reloads the inferior after it was... · 9f4f5d94
      Johnny Chen authored
      Add TestInferiorChanged.py to test that lldb reloads the inferior after it 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.
      
      llvm-svn: 137500
      9f4f5d94
  15. Aug 11, 2011
  16. Aug 05, 2011
    • Johnny Chen's avatar
      o modify-python-lldb.py: · 36c5eb13
      Johnny Chen authored
        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.
      
      llvm-svn: 136975
      36c5eb13
  17. Aug 03, 2011
    • Johnny Chen's avatar
      Add the real benchmarks comparing lldb against gdb for repeated expression evaluations. · aaa82ff9
      Johnny Chen authored
      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
      
      llvm-svn: 136740
      aaa82ff9
  18. Aug 01, 2011
  19. Jul 30, 2011
    • Johnny Chen's avatar
      Add a @benchmarks_test decorator for test method we want to categorize as benchmarks test. · 5ccbccfc
      Johnny Chen authored
      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.
      
      llvm-svn: 136553
      5ccbccfc
  20. Jul 16, 2011
  21. Jul 11, 2011
  22. Jun 27, 2011
    • Johnny Chen's avatar
      Add TestPrintObj.py to go with lang/objc/print-objc, which: · 89109ed1
      Johnny Chen authored
      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.
      
      llvm-svn: 133933
      89109ed1
  23. Jun 24, 2011
    • Johnny Chen's avatar
      o lldbtest.py: · b7373c92
      Johnny Chen authored
      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().
      
      llvm-svn: 133768
      b7373c92
  24. Jun 21, 2011
  25. Jun 20, 2011
  26. Jun 15, 2011
    • Johnny Chen's avatar
      Simplify the base test class. Remove keyword argument setCookie from TestBase.runCmd() and · 5b67ca8c
      Johnny Chen authored
      remove the self.runStarted attribute since the automatic shutdown of processes associated
      with the targets are now performed automatically.
      
      llvm-svn: 133092
      5b67ca8c
    • Johnny Chen's avatar
      Add an API to SBDebugger class: · 3794ad95
      Johnny Chen authored
          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);
      
      llvm-svn: 133091
      3794ad95
  27. Jun 14, 2011
  28. Jun 06, 2011
  29. Jun 01, 2011
  30. May 28, 2011
Loading