Skip to content
  1. Oct 11, 2010
  2. Oct 07, 2010
    • Johnny Chen's avatar
      Fix logic error of the option processing loop. · fbfba899
      Johnny Chen authored
      llvm-svn: 115916
      fbfba899
    • Johnny Chen's avatar
      o SBtarget.cpp/.h: · 0ed37c96
      Johnny Chen authored
        Temporarily commenting out the deprecated LaunchProcess() method.
        SWIG is not able to handle the overloaded functions.
      
      o dotest.py/lldbtest.py:
      
        Add an '-w' option to insert some wait time between consecutive test cases.
      
      o TestClassTypes.py:
      
        Make the breakpoint_creation_by_filespec_python() test method more robust and
        more descriptive by printing out a more insightful assert message.
      
      o lldb.swig: Coaches swig to treat StateType as an int type, instead of a C++ class.
      
      llvm-svn: 115899
      0ed37c96
  3. Oct 06, 2010
    • Johnny Chen's avatar
      Enhance the test driver with a '-f filterspec' option to specify the · 56e6cbda
      Johnny Chen authored
      testclass.testmethod to be run and with a '-g' option which instructs the test
      driver to only admit the module which satisfy the filterspec condition to the
      test suite.
      
      Example:
      
      # This only runs the test case under the array_types directory which has class
      # name of 'ArrayTypesTestCase' and the test method name of 'test_with_dwarf_and_run_command'.
      
      /Volumes/data/lldb/svn/trunk/test $ ./dotest.py -v -f 'ArrayTypesTestCase.test_with_dwarf_and_run_command' -g array_types
      ----------------------------------------------------------------------
      Collected 1 test
      
      test_with_dwarf_and_run_command (TestArrayTypes.ArrayTypesTestCase)
      Test 'frame variable var_name' on some variables with array types. ... ok
      
      ----------------------------------------------------------------------
      Ran 1 test in 1.353s
      
      OK
      
      # And this runs the test cases under the array_types and the hello_world directories.
      # If the module discovered has the 'ArrayTypesTestCase.test_with_dwarf_and_run_command'
      # attribute, only the test case specified by the filterspec for the module will be run.
      # If the module does not have the said attribute, e.g., the module under hello_world,
      # the whole module is still admitted to the test suite.
      
      /Volumes/data/lldb/svn/trunk/test $ ./dotest.py -v -f 'ArrayTypesTestCase.test_with_dwarf_and_run_command' array_types hello_world
      ----------------------------------------------------------------------
      Collected 3 tests
      
      test_with_dwarf_and_run_command (TestArrayTypes.ArrayTypesTestCase)
      Test 'frame variable var_name' on some variables with array types. ... ok
      test_with_dsym_and_run_command (TestHelloWorld.HelloWorldTestCase)
      Create target, breakpoint, launch a process, and then kill it. ... ok
      test_with_dwarf_and_process_launch_api (TestHelloWorld.HelloWorldTestCase)
      Create target, breakpoint, launch a process, and then kill it. ... ok
      
      ----------------------------------------------------------------------
      Ran 3 tests in 4.964s
      
      OK
      
      llvm-svn: 115832
      56e6cbda
  4. Oct 02, 2010
    • Johnny Chen's avatar
      o Added a new feature to the test framework to skip long running tests conditionally. · da88434b
      Johnny Chen authored
        To not skip long running tests, pass '-l' to the test driver (dotest.py).
      
        An example:
      
          @unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test")
          def test_foundation_disasm(self):
              ...
      
      o Added a long running disassemble test to the foundation directory, which iterates
        the code symbols from Foundation.framework and kicks off a disassemble command for
        for the named function symbol.  Found a crasher: rdar://problem/8504895.
      
      o Plus added/updated some comments for the TestBase class.
      
      llvm-svn: 115368
      da88434b
  5. Sep 30, 2010
  6. Sep 28, 2010
    • Johnny Chen's avatar
      Added "float" and "double" to types/TestBasicTypes.py. Abstracted the generic · 6316021b
      Johnny Chen authored
      type tester method into its own abstarct base class 'AbstractBase'.  And
      added TestIntegerTypes.py and TestFloatTypes.py.
      
      Added an option "-p reg-exp-pattern" to the test driver to specify a regular
      expression pattern to match against eligible filenames as our test cases.
      
      An example: 
      
      /Volumes/data/lldb/svn/trunk/test $ ./dotest.py -v -p "TestFloat.*" types
      ----------------------------------------------------------------------
      Collected 4 tests
      
      test_double_type_with_dsym (TestFloatTypes.FloatTypesTestCase)
      Test that double-type variables are displayed correctly. ... ok
      test_double_type_with_dwarf (TestFloatTypes.FloatTypesTestCase)
      Test that double-type variables are displayed correctly. ... ok
      test_float_type_with_dwarf (TestFloatTypes.FloatTypesTestCase)
      Test that float-type variables are displayed correctly. ... ok
      test_float_types_with_dsym (TestFloatTypes.FloatTypesTestCase)
      Test that float-type variables are displayed correctly. ... ok
      
      ----------------------------------------------------------------------
      Ran 4 tests in 5.592s
      
      OK
      
      llvm-svn: 114923
      6316021b
  7. Sep 21, 2010
    • Johnny Chen's avatar
      Changed the order of two assignment stmts. · 958da040
      Johnny Chen authored
      llvm-svn: 114381
      958da040
    • Johnny Chen's avatar
      Added the capability to source the configFile specified via the "-c" option in · 209cdbef
      Johnny Chen authored
      order to customize the running of the test suite.  For the time being, the
      supported customizations are:
      
      o redirecting stdout and/or stderr
      o specifying a list of compilers to build the test programs
      o specifying a list of architectures to build the test programs for
      
      Also checked into the examples/test directory some example files which
      demonstrate the usage for the above customizations.
      
      $ ./dotest.py -v -c ~/.lldbtest-config persistent_variables
      $ cat ~/.lldbtest-config
      sys.stderr = open("/tmp/lldbtest-stderr", "w")
      sys.stdout = open("/tmp/lldbtest-stdout", "w")
      compilers = ["gcc", "llvm-gcc"]
      archs = ["x86_64", "i386"]
      $ cat /tmp/lldbtest-stderr
      ----------------------------------------------------------------------
      Collected 1 test
      
      
      Configuration: arch=x86_64 compiler=gcc
      test_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase)
      Test that lldb persistent variables works correctly. ... ok
      
      ----------------------------------------------------------------------
      Ran 1 test in 1.397s
      
      OK
      
      Configuration: arch=x86_64 compiler=llvm-gcc
      test_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase)
      Test that lldb persistent variables works correctly. ... ok
      
      ----------------------------------------------------------------------
      Ran 1 test in 1.282s
      
      OK
      
      Configuration: arch=i386 compiler=gcc
      test_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase)
      Test that lldb persistent variables works correctly. ... ok
      
      ----------------------------------------------------------------------
      Ran 1 test in 1.297s
      
      OK
      
      Configuration: arch=i386 compiler=llvm-gcc
      test_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase)
      Test that lldb persistent variables works correctly. ... ok
      
      ----------------------------------------------------------------------
      Ran 1 test in 1.269s
      
      OK
      $ cat /tmp/lldbtest-stdout
      $ 
      
      llvm-svn: 114380
      209cdbef
  8. Sep 20, 2010
  9. Sep 18, 2010
  10. Sep 16, 2010
  11. Sep 15, 2010
    • Johnny Chen's avatar
      Also added BuildAndIntegration to the directories to search for an existing · 73982b94
      Johnny Chen authored
      lldb.py module.  The priorities to search for are Debug, Release, then
      BuildAndIntegration.  You can always override this with a valid PYTHONPATH
      environment variable before running the test driver.
      
      For example:
      
      $ PYTHONPATH=/Find/My/LLDB/Module/Here ./dotest.py -v .
      
      Python runtime will try to locate the lldb.py module from
      /Find/My/LLDB/Module/Here first before trying the Debug, Release, and then
      BuildAndIntegration directories.
      
      llvm-svn: 113991
      73982b94
    • Johnny Chen's avatar
      Removed the expectedFailure decorator from test_with_dwarf_and_run_command() test case · 1aad5c61
      Johnny Chen authored
      as it now passes.  Added some extra tests to breakpoint_creation_by_filespec_python().
      
      More clarification for the "os command" output and error as defined in
      lldbtest.system() function.
      
      Cleaned up the option processing of the test driver (dotest.py) and fixed the comment
      about enabling gdb-remote logging.  Example:
      
      $ GDB_REMOTE_LOG=/tmp/log.txt ./dotest.py -v -t enum_types
      
      llvm-svn: 113868
      1aad5c61
  12. Sep 08, 2010
  13. Aug 31, 2010
  14. Aug 23, 2010
    • Johnny Chen's avatar
      Changed the keyword argument for runCmd()/expect() from 'verbose' to 'trace', · d0190a61
      Johnny Chen authored
      which, defaults to False, and if set to True, will trace lldb command execution
      and result.
      
      Added "-t" command option to the test driver dotest.py which sets the
      LLDB_COMMAND_TRACE environment variable to "YES" and as a result always turns on
      command tracing regardless of the 'trace' keyword argument to runCmd()/expect().
      
      llvm-svn: 111811
      d0190a61
  15. Aug 18, 2010
  16. Aug 17, 2010
  17. Aug 14, 2010
  18. Aug 10, 2010
  19. Aug 09, 2010
  20. Aug 07, 2010
  21. Aug 06, 2010
  22. Jul 03, 2010
  23. Jul 02, 2010
  24. Jun 30, 2010
  25. Jun 29, 2010
  26. Jun 26, 2010
  27. Jun 25, 2010
    • Johnny Chen's avatar
      A simple testing framework for lldb using python's unit testing framework. · a765c28d
      Johnny Chen authored
      Tests for lldb are written as python scripts which take advantage of the script
      bridging provided by LLDB.framework to interact with lldb core.
      
      A specific naming pattern is followed by the .py script to be recognized as
      a module which implements a test scenario, namely, Test*.py.
      
      To specify the directories where "Test*.py" python test scripts are located,
      you need to pass in a list of directory names.  By default, the current
      working directory is searched if nothing is specified on the command line.
      
      An example:
      
      [14:10:20] johnny:/Volumes/data/lldb/svn/trunk/test $ ./dotest.py -v example
      test_choice (TestSequenceFunctions.TestSequenceFunctions) ... ok
      test_sample (TestSequenceFunctions.TestSequenceFunctions) ... ok
      test_shuffle (TestSequenceFunctions.TestSequenceFunctions) ... ok
      
      ----------------------------------------------------------------------
      Ran 3 tests in 0.000s
      
      OK
      
      llvm-svn: 106890
      a765c28d
Loading