Skip to content

Add TIMED_TEST_SUITE_INITIALIZE/CLEANUP guidelines to coding instructions#335

Open
parth21999 wants to merge 1 commit intomasterfrom
paaggarwal/add-timed-test-suite-instructions
Open

Add TIMED_TEST_SUITE_INITIALIZE/CLEANUP guidelines to coding instructions#335
parth21999 wants to merge 1 commit intomasterfrom
paaggarwal/add-timed-test-suite-instructions

Conversation

@parth21999
Copy link
Member

Summary

Adds a new section to general_coding_instructions.md documenting that test suites must use TIMED_TEST_SUITE_INITIALIZE and TIMED_TEST_SUITE_CLEANUP (from c_pal/timed_test_suite.h) instead of the raw TEST_SUITE_INITIALIZE / TEST_SUITE_CLEANUP macros.

Why

We are adding a process watchdog to all test suites that terminates the test process if a suite hangs, preventing CI pipelines from stalling indefinitely. The timed wrapper macros inject the watchdog fixtures automatically. The raw TEST_SUITE_INITIALIZE / TEST_SUITE_CLEANUP macros have been renamed to _INTERNAL in c-testrunnerswitcher (see Azure/c-testrunnerswitcher#287) and will produce a compile error if used directly.

What's documented

  • Usage examples with TIMED_TEST_SUITE_INITIALIZE / TIMED_TEST_SUITE_CLEANUP
  • How to pass additional fixtures via variadic arguments
  • Guidelines: always include c_pal/timed_test_suite.h, use TIMED_TEST_DEFAULT_TIMEOUT_MS unless a custom timeout is needed

…ions

Document that test suites must use TIMED_TEST_SUITE_INITIALIZE and
TIMED_TEST_SUITE_CLEANUP instead of the raw TEST_SUITE_INITIALIZE/CLEANUP
macros. The timed versions inject a process watchdog that terminates
test suites that hang, preventing CI pipelines from stalling.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant