Repository navigation
chore(dfpt): consolidate module_dfpt tests into unittests/ - #8394
Open
Zanthoxylum wants to merge 1 commit into
Open
Zanthoxylum wants to merge 1 commit into
Zanthoxylum wants to merge 1 commit into
Conversation
Migrate the legacy test_serial/ (serial, __MPI-off ABI) and test/ (MPI) directories into a single unittests/ directory, following the unittests/ layout rule and the module_stodft precedent in deepmodeling#8334. - All 10 addtest targets keep their names (MODULE_DFPT_pert_serial, rho_serial, phon_serial, q0_serial, write_dyn_serial, xc_analytic_serial, pw_data_test, kq_basis_test, stern_test, pw_run_test), so the CTest labels and the CI matrix are unchanged. - The MPI targets opt back into __MPI via KEEP_FEATURE_DEFINITIONS while the directory disables it for the serial ABI (the AddTest mechanism documented in cmake/Testing.cmake); they stay wrapped in ENABLE_MPI as before. - Test sources are renamed to the test_<module>.cpp convention (dfpt_kq_basis_test.cpp -> test_dfpt_kq_basis.cpp etc.); the shared fixtures keep their header names and gain test_-prefixed sources (test_dfpt_fixture.cpp, test_dfpt_stru_fixture.cpp, test_dfpt_mocks.cpp). - No test content changes: case counts are identical to the baseline (phon_serial 20, rho_serial 11, pert_serial 7), and all binaries relink against the same source lists. No documentation update required: internal test-layout consolidation with no user-facing behavior change. Verification: - ctest -R MODULE_DFPT: 10/10 passed after full reconfiguration - agent_governance_check.py --staged: no ERROR findings - gtest case counts match the develop baseline per target
This branch has not been deployed
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.
Summary
Migrate the legacy
test_serial/(serial,__MPI-off ABI) andtest/(MPI)directories of
source/source_pw/module_dfpt/into a singleunittests/directory, following the unittests/ layout rule and the module_stodft
precedent in #8334.
MODULE_DFPT_pert_serial,rho_serial,phon_serial,q0_serial,write_dyn_serial,xc_analytic_serial,pw_data_test,kq_basis_test,stern_test,pw_run_test), so the CTest labels and the CI test matrix are unchanged.__MPIviaKEEP_FEATURE_DEFINITIONSwhile the directory disables it for the serial ABI — the AddTest
mechanism documented in
cmake/Testing.cmake— and stay wrapped inENABLE_MPIas before. Thedfpt_planewave_serialOBJECT library movesunchanged (same directory depth, same relative source paths).
test_<module>.cppconvention(
dfpt_kq_basis_test.cpp→test_dfpt_kq_basis.cpp,dfpt_pert_serial_test.cpp→test_dfpt_pert.cpp,dfpt_pw_data_test.cpp→test_dfpt_pw_data.cpp,dfpt_pw_run_test.cpp→test_dfpt_pw_run.cpp,dfpt_stern_test.cpp→test_dfpt_stern.cpp); the shared fixtures keeptheir header names and gain
test_-prefixed sources(
test_dfpt_fixture.cpp,test_dfpt_stru_fixture.cpp,test_dfpt_mocks.cpp).no timeout/property settings added. The move is
git mv+ the CMakeconsolidation only.
No documentation update required: internal test-layout consolidation with
no user-facing behavior change.
Verification
ctest -R MODULE_DFPT: 10/10passed (both serial and MPI targets).
MODULE_DFPT_phon_serial20,MODULE_DFPT_rho_serial11,MODULE_DFPT_pert_serial7.python3 tools/03_code_analysis/agent_governance_check.py --staged:no ERROR findings.