abacus-develop icon indicating copy to clipboard operation
abacus-develop copied to clipboard

Test: the management of integrated test executables `sum_ENV_H2`, `sum_ENV_H2_cube`, ... is a little bit strange

Open kirk0830 opened this issue 2 years ago • 2 comments

Describe the Testing Issue

Those executables would generate after compiling with flag DBUILD_TESTING=1, but .gitignore does not know they are files generated for integrated test, so each time these files are generated, git will treat as "change of codes". However, the script in tests/integrated/clean.sh, which is designed to clean all temporarily generated output of integrated tests, is capable to delete sum_ENV_H2, sum_ENV_H2_cube, ...., it is strange. Comparatively executables of unittest would be in /build/ directory and all contents in it are ignored according to setting in .gitignore.

My suggestion would be:

  • If sum_ENV_H2, sum_ENV_H2_cube, .... are temporarily generated executables like unit test, then they should be record in .gitignore, and tests/integrated/clean.sh should not be capable to delete them.
  • If sum_ENV_H2, sum_ENV_H2_cube, .... are treated as output, they should be record in .gitignore too, in this case clean.sh should be capable to delete them, but they are not generated because of any ABACUS run, unlike other files that can be delete by clean.sh.

Additional Context

No response

Task list for Issue attackers (only for developers)

  • [ ] Understand the testing issue described by the developer.
  • [ ] Review the specific test case, expected and actual results, and any error messages.
  • [ ] Identify the root cause of the test failure or issue.
  • [ ] If a possible solution is suggested, evaluate its feasibility and effectiveness.
  • [ ] Implement a fix for the test failure or issue, or create a new test case if needed.
  • [ ] Verify that the fix resolves the testing issue and the test case passes.
  • [ ] Review and update any relevant documentation, such as test plans or user guides.
  • [ ] Ensure the testing issue is resolved and close the ticket.
  • [ ] Share any lessons learned or best practices with the team to prevent similar issues in the future.

kirk0830 avatar Jan 14 '24 03:01 kirk0830

@kirk0830 Those files are added at https://github.com/deepmodeling/abacus-develop/blob/2b254b5c0b56a09d4be32135bce4870e421f89d4/tests/integrate/CMakeLists.txt#L16 to compare some values. It's OK to put them under build/.

caic99 avatar Jan 29 '24 01:01 caic99

@kirk0830 should we keep this issue open still?

WHUweiqingzhou avatar Apr 15 '24 06:04 WHUweiqingzhou