Skip to content

[Test] Use WARNING_QUIT instead of exit, Add and refactor unittests for ParaGlobal#6781

Merged
mohanchen merged 13 commits intodeepmodeling:developfrom
Cstandardlib:refactor/para-unittests
Dec 15, 2025
Merged

[Test] Use WARNING_QUIT instead of exit, Add and refactor unittests for ParaGlobal#6781
mohanchen merged 13 commits intodeepmodeling:developfrom
Cstandardlib:refactor/para-unittests

Conversation

@Cstandardlib
Copy link
Collaborator

@Cstandardlib Cstandardlib commented Dec 13, 2025

Linked PR

#6771

Unit Tests and/or Case Tests for my changes

  • Add ParaGlobalDeathTest for Parallel_Global, specifically for error-exit cases.
  • Add tests for kpar check in Parallel_Global with WARNING_QUIT.
  • Use a single process for DeathTest.

What's changed?

  • TEST: Use GoogleTest DeathTest convension.
  • Write Error/Warning message to stdout and check by redirecting stdout to stderr in test context to be captured by gtest EXPECT_EXIT.

Any changes of core modules? (ignore if not applicable)

  • Switch to WARNING_QUIT instead of exit if the input parallel group does not meet expectations.

Note

Note that WARNING_QUIT writes warning/error log to stdout.

@mohanchen mohanchen added Refactor Refactor ABACUS codes Unit Tests/Integreate Tests Issues/PR related to unit tests and integrate tests labels Dec 15, 2025
@mohanchen mohanchen merged commit 3e41893 into deepmodeling:develop Dec 15, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactor Refactor ABACUS codes Unit Tests/Integreate Tests Issues/PR related to unit tests and integrate tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants