[all-commits] [llvm/llvm-project] 9216ba: [lldb/test] Add events listener helper function to...

Med Ismail Bennani via All-commits all-commits at lists.llvm.org
Wed Mar 23 12:30:30 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9216baf87d887b75d114e9621cf2ccfa0f19a386
      https://github.com/llvm/llvm-project/commit/9216baf87d887b75d114e9621cf2ccfa0f19a386
  Author: Med Ismail Bennani <medismail.bennani at gmail.com>
  Date:   2022-03-23 (Wed, 23 Mar 2022)

  Changed paths:
    M lldb/packages/Python/lldbsuite/test/lldbutil.py
    M lldb/test/API/functionalities/diagnostic_reporting/TestDiagnosticReporting.py
    M lldb/test/API/functionalities/progress_reporting/TestProgressReporting.py

  Log Message:
  -----------
  [lldb/test] Add events listener helper function to lldbtest

This patch introduces 2 new lldb utility functions:
- lldbutil.start_listening_from: This can be called in the test setup to
  create a listener and set it up for a specific event mask and add it
  to the user-provided broadcaster's list.
- lldbutil.fetch_next_event: This will use fetch a single event from the
  provided istener and return it if it matches the provided broadcaster.

The motivation behind this is to easily test new kinds of events
(i.e. Swift type-system progress events). However, this patch also
updates `TestProgressReporting.py` and `TestDiagnosticReporting.py`
to make use of these new helper functions.

Differential Revision: https://reviews.llvm.org/D122193

Signed-off-by: Med Ismail Bennani <medismail.bennani at gmail.com>




More information about the All-commits mailing list