本文整理汇总了Python中lldbsuite.test_event.event_builder.EventBuilder.add_entries_to_all_events方法的典型用法代码示例。如果您正苦于以下问题:Python EventBuilder.add_entries_to_all_events方法的具体用法?Python EventBuilder.add_entries_to_all_events怎么用?Python EventBuilder.add_entries_to_all_events使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lldbsuite.test_event.event_builder.EventBuilder
的用法示例。
在下文中一共展示了EventBuilder.add_entries_to_all_events方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: parseOptionsAndInitTestdirs
# 需要导入模块: from lldbsuite.test_event.event_builder import EventBuilder [as 别名]
# 或者: from lldbsuite.test_event.event_builder.EventBuilder import add_entries_to_all_events [as 别名]
#.........这里部分代码省略.........
configuration.sdir_name = args.s
configuration.session_file_format = args.session_file_format
if args.t:
os.environ['LLDB_COMMAND_TRACE'] = 'YES'
if args.v:
configuration.verbose = 2
# argparse makes sure we have a number
if args.sharp:
configuration.count = args.sharp
if sys.platform.startswith('win32'):
os.environ['LLDB_DISABLE_CRASH_DIALOG'] = str(
args.disable_crash_dialog)
os.environ['LLDB_LAUNCH_INFERIORS_WITHOUT_CONSOLE'] = str(True)
if do_help:
usage(parser)
if args.no_multiprocess:
configuration.no_multiprocess_test_runner = True
if args.inferior:
configuration.is_inferior_test_runner = True
if args.num_threads:
configuration.num_threads = args.num_threads
if args.test_subdir:
configuration.multiprocess_test_subdir = args.test_subdir
if args.test_runner_name:
configuration.test_runner_name = args.test_runner_name
# Capture test results-related args.
if args.curses and not args.inferior:
# Act as if the following args were set.
args.results_formatter = "lldbsuite.test_event.formatter.curses.Curses"
args.results_file = "stdout"
if args.results_file:
configuration.results_filename = args.results_file
if args.results_port:
configuration.results_port = args.results_port
if args.results_file and args.results_port:
sys.stderr.write(
"only one of --results-file and --results-port should "
"be specified\n")
usage(args)
if args.results_formatter:
configuration.results_formatter_name = args.results_formatter
if args.results_formatter_options:
configuration.results_formatter_options = args.results_formatter_options
# Default to using the BasicResultsFormatter if no formatter is specified
# and we're not a test inferior.
if not args.inferior and configuration.results_formatter_name is None:
configuration.results_formatter_name = (
"lldbsuite.test_event.formatter.results_formatter.ResultsFormatter")
# rerun-related arguments
configuration.rerun_all_issues = args.rerun_all_issues
configuration.rerun_max_file_threshold = args.rerun_max_file_threshold
if args.lldb_platform_name:
configuration.lldb_platform_name = args.lldb_platform_name
if args.lldb_platform_url:
configuration.lldb_platform_url = args.lldb_platform_url
if args.lldb_platform_working_dir:
configuration.lldb_platform_working_dir = args.lldb_platform_working_dir
if args.event_add_entries and len(args.event_add_entries) > 0:
entries = {}
# Parse out key=val pairs, separated by comma
for keyval in args.event_add_entries.split(","):
key_val_entry = keyval.split("=")
if len(key_val_entry) == 2:
(key, val) = key_val_entry
val_parts = val.split(':')
if len(val_parts) > 1:
(val, val_type) = val_parts
if val_type == 'int':
val = int(val)
entries[key] = val
# Tell the event builder to create all events with these
# key/val pairs in them.
if len(entries) > 0:
EventBuilder.add_entries_to_all_events(entries)
# Gather all the dirs passed on the command line.
if len(args.args) > 0:
configuration.testdirs = list(
map(lambda x: os.path.realpath(os.path.abspath(x)), args.args))
# Shut off multiprocessing mode when test directories are specified.
configuration.no_multiprocess_test_runner = True