Skip to content

Commit 58fbf9e

Browse files
authored
[Test] Add tests in subdirectories to its module (#6231)
* Add tests in subdirectories * Add tests in module_io, module_cell and module_hsolver's subdirectories
1 parent a2bcdf7 commit 58fbf9e

File tree

11 files changed

+23
-23
lines changed

11 files changed

+23
-23
lines changed

source/module_base/grid/test/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
remove_definitions(-D__MPI)
22

33
AddTest(
4-
TARGET test_delley
4+
TARGET MODULE_BASE_GRID_test_delley
55
SOURCES test_delley.cpp
66
../delley.cpp
77
../../ylm.cpp
88
)
99

1010
AddTest(
11-
TARGET test_radial
11+
TARGET MODULE_BASE_GRID_test_radial
1212
SOURCES test_radial.cpp
1313
../radial.cpp
1414
)
1515

1616
AddTest(
17-
TARGET test_partition
17+
TARGET MODULE_BASE_GRID_test_partition
1818
SOURCES test_partition.cpp
1919
../partition.cpp
2020
../radial.cpp
2121
../delley.cpp
2222
)
2323

2424
AddTest(
25-
TARGET test_batch
25+
TARGET MODULE_BASE_GRID_test_batch
2626
SOURCES test_batch.cpp
2727
../batch.cpp
2828
LIBS ${math_libs}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
remove_definitions(-D__MPI)
22

33
AddTest(
4-
TARGET Base_Kernels_UTs
4+
TARGET MODULE_BASE_KERNELS_Unittests
55
LIBS parameter ${math_libs} base device
66
SOURCES math_ylm_op_test.cpp math_kernel_test.cpp
77
)

source/module_base/libm/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
remove_definitions(-D__MPI)
22

33
AddTest(
4-
TARGET Base_Libm_UTs
4+
TARGET MODULE_BASE_LIBM_UTs
55
SOURCES libm_test.cpp
66
../branred.cpp
77
../cexp.cpp

source/module_base/module_container/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
remove_definitions(-D__MPI)
22

33
AddTest(
4-
TARGET container_uts
4+
TARGET MODULE_BASE_CONTAINER_Unittests
55
LIBS parameter container base device ${math_libs}
66
SOURCES tensor_test.cpp tensor_shape_test.cpp allocator_test.cpp
77
tensor_buffer_test.cpp tensor_map_test.cpp
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AddTest(
2-
TARGET Module_Device_UTs
2+
TARGET MODULE_BASE_DEVICE_Unittests
33
LIBS parameter ${math_libs} base device
44
SOURCES memory_test.cpp device_test.cpp
55
)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
remove_definitions(-D__MPI)
22
AddTest(
3-
TARGET test_mixing
3+
TARGET MODULE_BASE_MIXING_unittests
44
LIBS parameter base device ${math_libs}
55
SOURCES mixing_test.cpp
66
)

source/module_cell/module_neighbor/test/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ remove_definitions(-D__ROCM)
55
remove_definitions(-D__EXX)
66

77
AddTest(
8-
TARGET cell_neighbor_sltk_atom
8+
TARGET MODULE_CELL_NEIGHBOR_sltk_atom
99
SOURCES sltk_atom_test.cpp ../sltk_atom.cpp
1010
)
1111

1212
AddTest(
13-
TARGET cell_neighbor_sltk_grid
13+
TARGET MODULE_CELL_NEIGHBOR_sltk_grid
1414
LIBS parameter ${math_libs} base device cell_info
1515
SOURCES sltk_grid_test.cpp ../sltk_grid.cpp ../sltk_atom.cpp
1616
../../../module_io/output.cpp
1717
)
1818

1919
AddTest(
20-
TARGET cell_neighbor_sltk_atom_arrange
20+
TARGET MODULE_CELL_NEIGHBOR_sltk_atom_arrange
2121
LIBS parameter ${math_libs} base device cell_info
2222
SOURCES sltk_atom_arrange_test.cpp ../sltk_atom_arrange.cpp ../sltk_grid_driver.cpp ../sltk_grid.cpp
2323
../sltk_atom.cpp

source/module_cell/module_symmetry/test/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ remove_definitions(-D__DEEPKS)
33
remove_definitions(-D__CUDA)
44
remove_definitions(-D__ROCM)
55
AddTest(
6-
TARGET symmetry_analysis
6+
TARGET MODULE_CELL_SYMMETRY_analysis
77
LIBS parameter base ${math_libs} device symmetry
88
SOURCES symmetry_test.cpp symmetry_test_analysis.cpp
99
)
1010
AddTest(
11-
TARGET symmetry_symtrz
11+
TARGET MODULE_CELL_SYMMETRY_symtrz
1212
LIBS parameter base ${math_libs} device symmetry
1313
SOURCES symmetry_test.cpp symmetry_test_symtrz.cpp
1414
)

source/module_hsolver/kernels/test/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ remove_definitions(-D__ROCM)
33

44
if(USE_CUDA OR USE_ROCM)
55
AddTest(
6-
TARGET Hsolver_Kernels_UTs
6+
TARGET MODULE_HSOLVER_KERNELS_Unittests
77
LIBS parameter ${math_libs} base device
88
SOURCES math_dngvd_test.cpp
99
)
1010
endif()
1111

1212
if(ENABLE_GOOGLEBENCH)
1313
AddTest(
14-
TARGET Perf_Hsolver_Kernels
14+
TARGET PERF_MODULE_HSOLVER_KERNELS
1515
LIBS parameter ${math_libs} base device
1616
SOURCES perf_math_kernel.cpp
1717
)

source/module_io/json_output/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ remove_definitions(-D__ROCM)
44
remove_definitions(-D__EXX)
55

66
AddTest(
7-
TARGET io_json_output_json
7+
TARGET MODULE_IO_JSON_OUTPUT_TEST
88
LIBS parameter ${math_libs} base device cell_info
99
SOURCES para_json_test.cpp ../general_info.cpp ../init_info.cpp ../readin_info.cpp
1010
../../para_json.cpp ../abacusjson.cpp ../../output.cpp

0 commit comments

Comments
 (0)