Skip to content
  • 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
Loading