Add XClib unit tests.

This commit is contained in:
Ye Luo 2021-05-02 16:00:35 -05:00
parent 3598304f6e
commit 4c419482ac
3 changed files with 23 additions and 1 deletions

View File

@ -63,5 +63,15 @@ if(QE_ENABLE_TEST)
qe_mpi_fortran
qe_external_libxc
qe_xclib)
#add_test(NAME test_qe_xclib COMMAND $<TARGET_FILE:qe_xclib_test>)
find_program(BASH_PROGRAM bash)
file(GLOB test_input_file_names
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/test_input_files
test_input_files/*.in)
foreach(test_input_file IN LISTS test_input_file_names)
string(REGEX REPLACE ".in$" "" test_input_file_name_no_extension ${test_input_file})
add_test(NAME test_qe_xclib_${test_input_file_name_no_extension} COMMAND ${BASH_PROGRAM} -c "$<TARGET_FILE:qe_xclib_test> < ${CMAKE_CURRENT_SOURCE_DIR}/test_input_files/${test_input_file}")
endforeach()
endif(QE_ENABLE_TEST)

View File

@ -0,0 +1,8 @@
&INPUT_NAMELIST
test='dft-comparison',
nspin=2,
family='LDA',
DF_OK=.FALSE.,
dft1='sla pz',
dft2='lda_x lda_c_pz'
/

View File

@ -0,0 +1,4 @@
&INPUT_NAMELIST
test='dft-info'
dft1='mgga_x_scan mgga_c_scan'
/