Skip to content
  1. Dec 02, 2010
  2. Dec 01, 2010
    • Johnny Chen's avatar
      Add a '-b blacklistFile' option to the test driver to take a file specifying the · 75739045
      Johnny Chen authored
      test classes or test cases to be excludued from the test suite.
      
      Check in an example blacklist file: blacklist.py:
      
      """
      'blacklist' is a Python dictionary, it stores the mapping of a string describing
      either a testclass or a testcase, i.e, testclass.testmethod, to the reason (a
      string) it is blacklisted.
      
      Following is an example which states that test class IntegerTypesExprTestCase
      should be skipped because 'This test class crashed' and the test case
      FoundationTestCase.test_data_type_and_expr_with_dsym should be skipped because
      it is 'Temporarily disabled'.
      
      blacklist = {'IntegerTypesExprTestCase': 'This test class crashed',
                   'FoundationTestCase.test_data_type_and_expr_with_dsym': 'Temporarily disabled'
                   }
      """
      
      blacklist = {}
      
      An example of invoking the test driver and specifying a blacklist file:
      
      ./dotest.py -b blacklist.py -v types
      
      This runs the tests under 'types' directory but excludes the tests specified in
      balcklist.py.
      
      llvm-svn: 120620
      75739045
  3. Nov 29, 2010
  4. Nov 17, 2010
    • Johnny Chen's avatar
      Make the string matching for 'frame variable' more stringent with respect to · 80e6db9c
      Johnny Chen authored
      output from clang and llvm-gcc compiled program; both generate the correct debug
      info with respect to the typedef scoped inside a namespace.
      
      Add a TestBase.getCompiler(self) method which returns the compiler in effect the
      test suite is now running with.  Subclasses (like TestNamespace) can use it to
      distinguish among different compilers.
      
      llvm-svn: 119445
      80e6db9c
  5. Nov 12, 2010
  6. Nov 11, 2010
  7. Nov 10, 2010
  8. Nov 09, 2010
    • Johnny Chen's avatar
      When dumping the session log for a failed/errored test, also emit the command to · 07569be7
      Johnny Chen authored
      invoke the test driver to rerun the very same test.  Example output:
      
      /Volumes/data/lldb/svn/trunk/test $ tail 2010-11-09-14_51_34/ExpectedFailure-TestSettings.SettingsCommandTestCase.test_set_output_path.log 
      
      Traceback (most recent call last):
        File "/Volumes/data/lldb/svn/trunk/test/settings/TestSettings.py", line 136, in test_set_output_path
          "'stdout.txt' exists due to target.process.output-path.")
      AssertionError: False is not True : 'stdout.txt' exists due to target.process.output-path.
      
      
      To rerun this test, issue the following command from the 'test' directory:
      
      ./dotest.py -v -t -f SettingsCommandTestCase.test_set_output_path
      
      llvm-svn: 118646
      07569be7
    • Johnny Chen's avatar
      Distinguish between the assert messages for runCmd and expect. The former now · c0c67f27
      Johnny Chen authored
      takes the form:
      
          "Command '%s' returns successfully" % str
      
      and the latter takes the form:
      
          "'%s' returns expected result" % str
          or
          "'%s' matches expected result" % str
      
      llvm-svn: 118599
      c0c67f27
  9. Nov 06, 2010
  10. Nov 05, 2010
  11. Nov 03, 2010
  12. Nov 01, 2010
  13. Oct 28, 2010
  14. Oct 23, 2010
  15. Oct 22, 2010
  16. Oct 21, 2010
    • Johnny Chen's avatar
      Add an option '-s session-dir-name' to overwrite the default timestamp-named · 096011ee
      Johnny Chen authored
      directory used to dump the session info for test failures/errors.
      
      Example:
      
      /Volumes/data/lldb/svn/trunk/test $ ./dotest.py -s jason -v array_types
      
      Session info for test errors or failures will go into directory jason
      ----------------------------------------------------------------------
      Collected 4 tests
      
      test_with_dsym_and_python_api (TestArrayTypes.ArrayTypesTestCase)
      Use Python APIs to inspect variables with array types. ... ok
      test_with_dsym_and_run_command (TestArrayTypes.ArrayTypesTestCase)
      Test 'frame variable var_name' on some variables with array types. ... ok
      test_with_dwarf_and_python_api (TestArrayTypes.ArrayTypesTestCase)
      Use Python APIs to inspect variables with array types. ... ok
      test_with_dwarf_and_run_command (TestArrayTypes.ArrayTypesTestCase)
      Test 'frame variable var_name' on some variables with array types. ... FAIL
      
      ======================================================================
      FAIL: test_with_dwarf_and_run_command (TestArrayTypes.ArrayTypesTestCase)
      Test 'frame variable var_name' on some variables with array types.
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/Volumes/data/lldb/svn/trunk/test/array_types/TestArrayTypes.py", line 27, in test_with_dwarf_and_run_command
          self.array_types()
        File "/Volumes/data/lldb/svn/trunk/test/array_types/TestArrayTypes.py", line 62, in array_types
          'stop reason = breakpoint'])
        File "/Volumes/data/lldb/svn/trunk/test/lldbtest.py", line 594, in expect
          self.runCmd(str, trace = (True if trace else False), check = not error)
        File "/Volumes/data/lldb/svn/trunk/test/lldbtest.py", line 564, in runCmd
          msg if msg else CMD_MSG(cmd, True))
      AssertionError: False is not True : Command 'thread list' returns successfully
      
      ----------------------------------------------------------------------
      Ran 4 tests in 3.086s
      
      FAILED (failures=1)
      /Volumes/data/lldb/svn/trunk/test $ ls jason
      TestArrayTypes.ArrayTypesTestCase.test_with_dwarf_and_run_command.log
      /Volumes/data/lldb/svn/trunk/test $ head -10 jason/TestArrayTypes.ArrayTypesTestCase.test_with_dwarf_and_run_command.log 
      Session info generated @ Thu Oct 21 09:54:15 2010
      
      os command: [['/bin/sh', '-c', 'make clean; make MAKE_DSYM=NO']]
      stdout: rm -rf "a.out" "a.out.dSYM"  main.o main.d
      cc -arch x86_64 -gdwarf-2 -O0   -c -o main.o main.c
      cc -arch x86_64 -gdwarf-2 -O0  main.o -o "a.out"
      
      stderr: None
      retcode: 0
      
      /Volumes/data/lldb/svn/trunk/test $ 
      
      llvm-svn: 117028
      096011ee
  17. Oct 20, 2010
  18. Oct 19, 2010
    • Johnny Chen's avatar
      Add a little helper function SETTING_MSG(setting) to be used from... · 3343f04b
      Johnny Chen authored
      Add a little helper function SETTING_MSG(setting) to be used from TestSettings.test_set_output_path().
      
      llvm-svn: 116847
      3343f04b
    • Johnny Chen's avatar
      Change the environment variable name to be more descriptive from... · 430eb760
      Johnny Chen authored
      Change the environment variable name to be more descriptive from LLDB_TIME_WAIT to LLDB_TIME_WAIT_NEXT_LAUNCH.
      
      llvm-svn: 116809
      430eb760
    • Johnny Chen's avatar
      Modify the test driver and lldbtest.TestBase so that the dumping of session info · 04d2c5cb
      Johnny Chen authored
      now goes into a timestamp-specific directory instead of the previous .session-*
      files.
      
      [17:24:34] johnny:/Volumes/data/lldb/svn/trunk $ ls -l test/2010-10-18-16:56:12.935342
      total 48
      -rw-r--r--  1 johnny  admin  1695 Oct 18 16:56 TestArrayTypes.ArrayTypesTestCase.test_with_dsym_and_run_command.log
      -rw-r--r--  1 johnny  admin  1652 Oct 18 16:56 TestArrayTypes.ArrayTypesTestCase.test_with_dwarf_and_run_command.log
      -rw-r--r--  1 johnny  admin  2967 Oct 18 16:56 TestBreakpointCommand.BreakpointCommandTestCase.test_with_dsym.log
      -rw-r--r--  1 johnny  admin  1648 Oct 18 16:56 TestClassTypes.ClassTypesTestCase.test_with_dwarf_and_run_command.log
      -rw-r--r--  1 johnny  admin  1665 Oct 18 16:56 TestClassTypesDisassembly.IterateFrameAndDisassembleTestCase.test_with_dsym_and_python_api.log
      -rw-r--r--  1 johnny  admin  3873 Oct 18 16:58 TestFloatTypesExpr.FloatTypesTestCase.test_float_types_with_dsym.log
      [17:24:37] johnny:/Volumes/data/lldb/svn/trunk $ 
      
      Also, the dumping happens when a test errored in additioned to when it failed.
      
      llvm-svn: 116778
      04d2c5cb
  19. Oct 16, 2010
    • Johnny Chen's avatar
      Missed this spot where module.cleanup() can be passed a test instance to · 24d6ea25
      Johnny Chen authored
      facilitate session recording.  This happens inside an instance method where the
      test instance is well known.
      
      llvm-svn: 116649
      24d6ea25
    • Johnny Chen's avatar
      Some re-achitecturing of the plugins interface. The caller is now required to · 690fcef7
      Johnny Chen authored
      pass in a 'sender' arg to the buildDefault(), buildDsym(), buildDwarf(), and
      cleanup() functions.  The sender arg will be the test instance itself (i.e.,
      an instance of TestBase).  This is so that the relevant command execution can be
      recorded in the TestBase.session object if sender is available.
      
      The lldbtest.system() command has been modified to pop the 'sender' arg out of
      the keyword arguments dictionary and use it as the test instance to facilitate
      seesion recordings.  An example is in test/types/AbstractBase.py:
      
          def generic_type_tester(self, atoms, quotedDisplay=False):
              """Test that variables with basic types are displayed correctly."""
      
              # First, capture the golden output emitted by the oracle, i.e., the
              # series of printf statements.
              go = system("./a.out", sender=self)
      
      There are cases when sender is None.  This is the case when the @classmethod is
      involved in the use of these APIs.  When this happens, there is no recording
      into a session object, but printing on the sys.stderr is still honored if the
      trace flag is ON.
      
      An example is in test/settings/TestSettings.py:
      
          @classmethod
          def classCleanup(cls):
              system(["/bin/sh", "-c", "rm -f output.txt"])
              system(["/bin/sh", "-c", "rm -f stdout.txt"])
      
      llvm-svn: 116648
      690fcef7
  20. Oct 15, 2010
    • Johnny Chen's avatar
      Add a test case for exercising breakpoint conditions using the lldb command: · 27b107b8
      Johnny Chen authored
          breakpoint modify -c 'val == 3' 1
      
      after:
      
          breakpoint set -n c
      
      which sets a breakpoint on function 'c'.  The breakpoint should only stop if
      expression 'val == 3' evaluates to true.
      
      llvm-svn: 116607
      27b107b8
    • Johnny Chen's avatar
      Add a const string for assert message. Remove extra printing of newlines from · 164f1e18
      Johnny Chen authored
      the session recordings.
      
      llvm-svn: 116596
      164f1e18
    • Johnny Chen's avatar
      Add more comments. · fd64df4f
      Johnny Chen authored
      llvm-svn: 116583
      fd64df4f
    • Johnny Chen's avatar
      Be more specific about cases whenthe runCmd() check flag is False, meaning there · ab254f5d
      Johnny Chen authored
      is no need to check the return status of the command execution, and an error
      status is not deemed a failure in the test.
      
      llvm-svn: 116582
      ab254f5d
    • Johnny Chen's avatar
      56f7939c
    • Johnny Chen's avatar
      This is an initial version of test driver enhanceent to be able to dump the · 150c3cc8
      Johnny Chen authored
      session info after a test case failure, allowing more direct inspection of
      debugger session which leads to the test failure.
      
      For a simple usage scenario:
      
      [18:06:26] johnny:/Volumes/data/lldb/svn/trunk/test $ ./dotest.py -v . 2> ~/Developer/Log/lldbtest.log 
      
      ...
      
      [18:14:43] johnny:/Volumes/data/lldb/svn/trunk/test $ ls -l .session-*
      -rw-r--r--  1 johnny  admin  1359 Oct 14 18:06 .session-TestArrayTypes.ArrayTypesTestCase.test_with_dwarf_and_run_command
      -rw-r--r--  1 johnny  admin  2054 Oct 14 18:07 .session-TestClassTypes.ClassTypesTestCase.test_with_dsym_and_expr_parser
      -rw-r--r--  1 johnny  admin  2055 Oct 14 18:07 .session-TestClassTypes.ClassTypesTestCase.test_with_dwarf_and_expr_parser
      -rw-r--r--  1 johnny  admin  1351 Oct 14 17:57 .session-TestClassTypes.ClassTypesTestCase.test_with_dwarf_and_run_command
      [18:14:51] johnny:/Volumes/data/lldb/svn/trunk/test $ 
      
      The test case which failed will have its recorded session info dumped to a
      .session-* file in the current working directory.  For test suite using
      relocated directory, expect to find the .session-* files there.
      
      In this checkin, I also add @skip decorator to the two test methods in
      test/foundation/TestObjCMethods.py as it looks like the test suite is
      deadlocking when running the tests.  More investigations are needed.
      
      llvm-svn: 116552
      150c3cc8
  21. Oct 14, 2010
    • Johnny Chen's avatar
      Add an initial version of test that exercise the lldb commands: 'process signal' · c066ab43
      Johnny Chen authored
      and 'process handle'.  The test suite would like to control the asynch/sync
      execution of the interpreter during the middle of the test method, so the
      CommandInterpreter::SetSynchronous(bool value) is modified to allow the mode to
      be changed more than once.
      
      In practice, it would be advisable to control the process and to set the
      async/sync mode from a single thread, too.
      
      llvm-svn: 116467
      c066ab43
  22. Oct 12, 2010
Loading