Skip to content

Conversation

@butako
Copy link

@butako butako commented Oct 14, 2025

Bug / Requirement Description

Add --testcase-timeout option to allow user define a timeout globally when running the test_plan. This is useful to enforce
timeout in a large project with many tests.

Solution description

New CLI, ConfigOption and Testcase

Checklist:

  • [Y] Test
  • [NA] Example (both test_plan.py and .rst)
  • [Y] Documentation (API)
  • [NA] News fragment present for release notes
  • [NA] MS info leakage check
  • [NA] For new driver: driver index page
  • [NA] For new assertion: ui/pdf/std renderers, documentation
  • [Y] For new cmdline arg: documentation

@butako butako requested a review from a team as a code owner October 14, 2025 19:56

time_restriction = getattr(testcase, "timeout", None)
# Use default testcase timeout from config if no explicit timeout is set
if time_restriction is None and self.cfg.testcase_timeout:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem here is in our tests, multitest doesn't always have a parent, thus when timeout is not provided at multitest level, self.cfg.testcase_timeout could raise no such attr. We can use hasattr/getattr here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants