Skip to content

Commit e1b500a

Browse files
committed
Make tests in module_cell indenpendent
1 parent f86814a commit e1b500a

File tree

8 files changed

+25
-25
lines changed

8 files changed

+25
-25
lines changed

source/module_cell/test/CMakeLists.txt

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,106 +39,106 @@ list(APPEND cell_simple_srcs
3939
add_library(cell_info OBJECT ${cell_simple_srcs})
4040

4141
AddTest(
42-
TARGET cell_read_pp
42+
TARGET MODULE_CELL_read_pp
4343
LIBS parameter ${math_libs} base device
4444
SOURCES read_pp_test.cpp ../atom_pseudo.cpp ../pseudo.cpp ../read_pp.cpp ../read_pp_complete.cpp ../read_pp_upf201.cpp ../read_pp_upf100.cpp ../read_pp_vwr.cpp ../read_pp_blps.cpp
4545
../../module_io/output.cpp
4646
)
4747

4848
AddTest(
49-
TARGET cell_pseudo_nc
49+
TARGET MODULE_CELL_pseudo_nc
5050
LIBS parameter ${math_libs} base device
5151
SOURCES pseudo_nc_test.cpp ../pseudo.cpp ../atom_pseudo.cpp ../read_pp.cpp ../read_pp_complete.cpp ../read_pp_upf201.cpp ../read_pp_upf100.cpp ../read_pp_vwr.cpp
5252
../read_pp_blps.cpp ../../module_io/output.cpp
5353
)
5454

5555
AddTest(
56-
TARGET cell_atom_pseudo
56+
TARGET MODULE_CELL_atom_pseudo
5757
LIBS parameter ${math_libs} base device
5858
SOURCES atom_pseudo_test.cpp ../atom_pseudo.cpp ../pseudo.cpp ../read_pp.cpp ../read_pp_complete.cpp ../read_pp_upf201.cpp ../read_pp_upf100.cpp
5959
../read_pp_vwr.cpp ../read_pp_blps.cpp ../../module_io/output.cpp
6060
)
6161

6262
AddTest(
63-
TARGET cell_atom_spec
63+
TARGET MODULE_CELL_atom_spec
6464
LIBS parameter ${math_libs} base device
6565
SOURCES atom_spec_test.cpp ../atom_spec.cpp ../atom_pseudo.cpp ../pseudo.cpp ../read_pp.cpp ../read_pp_complete.cpp ../read_pp_upf201.cpp
6666
../read_pp_upf100.cpp ../read_pp_vwr.cpp ../read_pp_blps.cpp ../../module_io/output.cpp
6767
)
6868

6969
AddTest(
70-
TARGET cell_klist_test
70+
TARGET MODULE_CELL_klist_test
7171
LIBS parameter ${math_libs} base device symmetry
7272
SOURCES klist_test.cpp ../klist.cpp ../parallel_kpoints.cpp ../../module_io/output.cpp
7373
)
7474

7575
AddTest(
76-
TARGET cell_klist_test_para1
76+
TARGET MODULE_CELL_klist_test_para1
7777
LIBS parameter ${math_libs} base device symmetry
7878
SOURCES klist_test_para.cpp ../klist.cpp ../parallel_kpoints.cpp ../../module_io/output.cpp
7979
)
8080

81-
add_test(NAME cell_klist_test_para4
81+
add_test(NAME MODULE_CELL_klist_test_para4
8282
COMMAND ${BASH} klist_test_para.sh
8383
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
8484
)
8585

8686
AddTest(
87-
TARGET cell_ParaKpoints
87+
TARGET MODULE_CELL_ParaKpoints
8888
LIBS parameter MPI::MPI_CXX
8989
SOURCES parallel_kpoints_test.cpp ../../module_base/global_variable.cpp ../../module_base/parallel_global.cpp
9090
../../module_base/parallel_common.cpp ../../module_base/parallel_comm.cpp ../parallel_kpoints.cpp
9191
)
9292

9393
find_program(BASH bash)
9494

95-
add_test(NAME cell_bcast_atom_pseudo_test
95+
add_test(NAME MODULE_CELL_bcast_atom_pseudo_test
9696
COMMAND ${BASH} bcast_atom_pseudo_test.sh
9797
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
9898
)
9999

100-
add_test(NAME cell_bcast_atom_spec_test
100+
add_test(NAME MODULE_CELL_bcast_atom_spec_test
101101
COMMAND ${BASH} bcast_atom_spec_test.sh
102102
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
103103
)
104104

105-
add_test(NAME cell_parallel_kpoints_test
105+
add_test(NAME MODULE_CELL_parallel_kpoints_test
106106
COMMAND ${BASH} parallel_kpoints_test.sh
107107
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
108108
)
109109

110110
AddTest(
111-
TARGET cell_unitcell_test
111+
TARGET MODULE_CELL_unitcell_test
112112
LIBS parameter ${math_libs} base device cell_info symmetry
113113
SOURCES unitcell_test.cpp ../../module_io/output.cpp ../../module_elecstate/cal_ux.cpp
114114

115115
)
116116

117117
AddTest(
118-
TARGET cell_unitcell_test_readpp
118+
TARGET MODULE_CELL_unitcell_test_readpp
119119
LIBS parameter ${math_libs} base device cell_info
120120
SOURCES unitcell_test_readpp.cpp ../../module_io/output.cpp
121121
)
122122

123123
AddTest(
124-
TARGET cell_unitcell_test_para
124+
TARGET MODULE_CELL_unitcell_test_para
125125
LIBS parameter ${math_libs} base device cell_info
126126
SOURCES unitcell_test_para.cpp ../../module_io/output.cpp
127127
)
128128

129129
AddTest(
130-
TARGET cell_unitcell_test_setupcell
130+
TARGET MODULE_CELL_unitcell_test_setupcell
131131
LIBS parameter ${math_libs} base device cell_info
132132
SOURCES unitcell_test_setupcell.cpp ../../module_io/output.cpp
133133
)
134134

135-
add_test(NAME cell_unitcell_test_parallel
135+
add_test(NAME MODULE_CELL_unitcell_test_parallel
136136
COMMAND ${BASH} unitcell_test_parallel.sh
137137
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
138138
)
139139

140140
AddTest(
141-
TARGET cell_index_test
141+
TARGET MODULE_CELL_index_test
142142
LIBS parameter ${math_libs} base device
143143
SOURCES cell_index_test.cpp ../cell_index.cpp
144144
)

source/module_cell/test/bcast_atom_pseudo_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ for i in 4;do
88
continue
99
fi
1010
echo "TEST in parallel, nprocs=$i"
11-
mpirun -np $i ./cell_atom_pseudo
11+
mpirun -np $i ./MODULE_CELL_atom_pseudo
1212
if [[ $? -ne 0 ]]; then
1313
echo -e "\e[1;33m [ FAILED ] \e[0m"\
1414
"execute UT with $i cores error."

source/module_cell/test/bcast_atom_spec_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ for i in 4;do
88
continue
99
fi
1010
echo "TEST in parallel, nprocs=$i"
11-
mpirun -np $i ./cell_atom_spec
11+
mpirun -np $i ./MODULE_CELL_atom_spec
1212
if [[ $? -ne 0 ]]; then
1313
echo -e "\e[1;33m [ FAILED ] \e[0m"\
1414
"execute UT with $i cores error."

source/module_cell/test/klist_test_para.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ for i in 4;do
88
continue
99
fi
1010
echo "TEST in parallel, nprocs=$i"
11-
mpirun -np $i ./cell_klist_test_para1
11+
mpirun -np $i ./MODULE_CELL_klist_test_para1
1212
if [[ $? -ne 0 ]]; then
1313
echo -e "\e[1;33m [ FAILED ] \e[0m"\
1414
"execute UT with $i cores error."

source/module_cell/test/parallel_kpoints_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ do
99
continue
1010
fi
1111
echo "TEST in parallel, nprocs=$i"
12-
mpirun -np $i ./cell_ParaKpoints
12+
mpirun -np $i ./MODULE_CELL_ParaKpoints
1313
if [ $? -ne 0 ]; then
1414
echo "TEST in parallel, nprocs=$i failed"
1515
exit 1

source/module_cell/test/unitcell_test_parallel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ for i in 4;do
88
continue
99
fi
1010
echo "TEST in parallel, nprocs=$i"
11-
mpirun -np $i ./cell_unitcell_test_para
11+
mpirun -np $i ./MODULE_CELL_unitcell_test_para
1212
if [[ $? -ne 0 ]]; then
1313
echo -e "\e[1;33m [ FAILED ] \e[0m"\
1414
"execute UT with $i cores error."

source/module_cell/test_pw/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ install(DIRECTORY support DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
99
install(FILES unitcell_test_pw_para.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
1010

1111
AddTest(
12-
TARGET cell_unitcell_test_pw
12+
TARGET MODULE_CELL_unitcell_test_pw
1313
LIBS parameter ${math_libs} base device
1414
SOURCES unitcell_test_pw.cpp ../unitcell.cpp ../read_atoms.cpp ../atom_spec.cpp ../update_cell.cpp ../bcast_cell.cpp
1515
../atom_pseudo.cpp ../pseudo.cpp ../read_pp.cpp ../read_pp_complete.cpp ../read_pp_upf201.cpp ../read_pp_upf100.cpp
@@ -21,7 +21,7 @@ AddTest(
2121
)
2222

2323
find_program(BASH bash)
24-
add_test(NAME cell_unitcell_test_pw_para
24+
add_test(NAME MODULE_CELL_unitcell_test_pw_para
2525
COMMAND ${BASH} unitcell_test_pw_para.sh
2626
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
2727
)

source/module_cell/test_pw/unitcell_test_pw_para.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ for i in 4;do
88
continue
99
fi
1010
echo "TEST in parallel, nprocs=$i"
11-
mpirun -np $i ./cell_unitcell_test_pw
11+
mpirun -np $i ./MODULE_CELL_unitcell_test_pw
1212
if [[ $? -ne 0 ]]; then
1313
echo -e "\e[1;33m [ FAILED ] \e[0m"\
1414
"execute UT with $i cores error."

0 commit comments

Comments
 (0)