Convert all tests to use TIMED_TEST_SUITE_INITIALIZE/CLEANUP#546
Open
parth21999 wants to merge 9 commits intomasterfrom
Open
Convert all tests to use TIMED_TEST_SUITE_INITIALIZE/CLEANUP#546parth21999 wants to merge 9 commits intomasterfrom
parth21999 wants to merge 9 commits intomasterfrom
Conversation
Replace TEST_SUITE_INITIALIZE/CLEANUP with TIMED_TEST_SUITE_INITIALIZE/ TIMED_TEST_SUITE_CLEANUP across all test files. Add c_pal/timed_test_suite.h to PCH files (before ENABLE_MOCKS) and integration test files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
Author
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Tests using TIMED_TEST_SUITE_INITIALIZE need to link against c_pal for the process_watchdog_init/deinit implementations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
Author
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
Author
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…_util_ut These tests include timed_test_suite.h which needs c_pal/process_watchdog.h. Without c_pal in ADDITIONAL_LIBS, the include path is not available. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
17ce93c to
4041ef7
Compare
Member
Author
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Repo validation requires all source files to end with CRLF newline. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
f5f90e9 to
0ec1371
Compare
Member
Author
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
The TIMED_TEST_SUITE macros call process_watchdog_init/deinit, which internally use interlocked functions. In unit tests, interlocked is mocked, causing crashes when the watchdog runs during suite cleanup after umock is torn down. Fix: add real_process_watchdog reals and include the renames in timed_test_suite.h so the watchdog always uses real (non-mocked) implementations of its dependencies. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1f07822 to
1c19738
Compare
Member
Author
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
The renames header must be on the same include path as timed_test_suite.h so all test targets can find it, not just those linking win32_reals. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
Author
|
/AzurePipelines run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
Member
Author
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
The renames header is always unconditional (for use by real_.c files), but timed_test_suite.h only includes it when UMOCK_C_H is defined, i.e. in unit tests with mocks. Integration tests call process_watchdog directly without going through reals. Also fix include order in 3 PCH files where timed_test_suite.h was included before umock_c.h. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
Author
|
/AzurePipelines run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
Member
Author
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Make the real_process_watchdog renames unconditional in timed_test_suite.h and add c_pal_reals to ADDITIONAL_LIBS in all 48 test CMakeLists.txt that were missing it. This ensures real_process_watchdog_init/deinit are always available regardless of whether the test is a unit test or integration test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
Author
|
/AzurePipelines run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Converts all test files from TEST_SUITE_INITIALIZE/CLEANUP to TIMED_TEST_SUITE_INITIALIZE/CLEANUP using the existing timed_test_suite.h from master.
Changes:
This PR uses the master version of timed_test_suite.h (no testrunnerswitcher changes required).