mirror of
https://github.com/NVIDIA/TensorRT-LLM.git
synced 2026-01-14 06:27:45 +08:00
Signed-off-by: Ivy Zhang <25222398+crazydemo@users.noreply.github.com> Signed-off-by: Mike Iovine <6158008+mikeiovine@users.noreply.github.com>
This commit is contained in:
parent
2b58dba0f6
commit
23717cdb3f
@ -2317,6 +2317,40 @@ def deselect_by_test_model_suites(test_model_suites, items, test_prefix,
|
||||
config.hook.pytest_deselected(items=deselected)
|
||||
items[:] = selected
|
||||
|
||||
# Initialize PeriodicJUnitXML reporter if enabled
|
||||
periodic = config.getoption("--periodic-junit", default=False)
|
||||
output_dir = config.getoption("--output-dir", default=None)
|
||||
|
||||
if periodic and output_dir:
|
||||
periodic_interval = config.getoption("--periodic-interval")
|
||||
periodic_batch_size = config.getoption("--periodic-batch-size")
|
||||
|
||||
# Create the reporter with logger
|
||||
xmlpath = os.path.join(output_dir, "results.xml")
|
||||
reporter = PeriodicJUnitXML(
|
||||
xmlpath=xmlpath,
|
||||
interval=periodic_interval,
|
||||
batch_size=periodic_batch_size,
|
||||
logger={
|
||||
'info': print_info,
|
||||
'warning': print_warning
|
||||
},
|
||||
)
|
||||
|
||||
# Configure and register the reporter
|
||||
reporter.pytest_configure(config)
|
||||
config.pluginmanager.register(reporter, 'periodic_junit')
|
||||
|
||||
print_info("PeriodicJUnitXML reporter registered")
|
||||
print_info(
|
||||
f" Interval: {periodic_interval}s ({periodic_interval/60:.1f} min)"
|
||||
)
|
||||
print_info(f" Batch size: {periodic_batch_size} tests")
|
||||
elif periodic and not output_dir:
|
||||
print_warning(
|
||||
"Warning: --periodic-junit requires --output-dir to be set. "
|
||||
"Periodic reporting disabled.")
|
||||
|
||||
|
||||
def deselect_by_test_model_suites(test_model_suites, items, test_prefix,
|
||||
config):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user