tests_old.cmake 1.93 KB
Newer Older
1 2
enable_testing()

Gregor Michalicek's avatar
Gregor Michalicek committed
3
set(SerialParallelTests CuBulk CuBulkXML SiLOXML Fe_1l Fe_1lXML Fe-Atom CuBand CuBandXML CuDOS CuDOSXML
4
Fe_bct Fe_bctXML PTO PTOXML Fe_1l_SOCXML PTO-SOC PTO-SOCXML Fe_bct_SOC Fe_bct_SOCXML Fe_fccXML
5
GaAsMultiUForceXML SiFilmPlotXML SiFilmSlicePlotXML CoMCDXML Fe_Kerker Fe_bct_LOXML )#SiHybridGamma)
6

7
set(SerialOnlyTests Fe_bct_LO Fe_fcc)# TiO2eels TiO2eelsXML)
8
set(InpgenTests Si_plain Si_plain_explicit Si_full_para)# Si_kpt Si_kden Si_round_trip) 
9 10 11

set(Testdirs ${SerialParallelTests} ${SerialOnlyTests})
set(ParTestdirs ${SerialParallelTests})
12
set(InpTestdirs ${InpgenTests})
13 14 15

#Check if all tests (including those running for a long time) should be executed
if (all_tests)
Gregor Michalicek's avatar
Gregor Michalicek committed
16
    set(Testdirs ${Testdirs} Bi2Te3 Bi2Te3XML NiO_ldauXML)
17
    set(ParTestdirs ${ParTestdirs} Bi2Te3 Bi2Te3XML NiO_ldauXML)
18 19
endif()

20 21 22 23 24 25 26
#The inpgen tests
#if (${INPGEN})
foreach(test ${InpTestdirs})
 add_test("INPGEN:${test}" ${CMAKE_CURRENT_SOURCE_DIR}/tests/test.pl "inpgen/${test}" "${CMAKE_BINARY_DIR}/inpgen")
endforeach(test)
#endif()

27 28
#Add Wannier tests if fleur is compiled with Wannier support
if (${FLEUR_USE_WANN})
29 30
    set(Testdirs ${Testdirs} Cwann CwannXML)
    set(ParTestdirs ${ParTestdirs} Cwann CwannXML)
31
endif()
32

Matthias Redies's avatar
Matthias Redies committed
33 34
#Tests for LibXC
if (${FLEUR_USE_LIBXC})
Matthias Redies's avatar
Matthias Redies committed
35 36
   set(Testdirs ${Testdirs} CuBulkLibXC Fe_bct_LibXC Diamond_SCAN)
   set(ParTestdirs ${ParTestdirs} CuBulkLibXC Fe_bct_LibXC Diamond_SCAN)
Matthias Redies's avatar
Matthias Redies committed
37
endif()
38
#The serial tests
39
if (${FLEUR_USE_SERIAL})
40
   foreach(test ${Testdirs})
41
    add_test("FLEUR:${test}" ${CMAKE_CURRENT_SOURCE_DIR}/tests/test.pl ${test} "${CMAKE_BINARY_DIR}/fleur")
42 43 44 45
   endforeach(test)
endif()

#The parallel tests
46
if (${FLEUR_USE_MPI})
47 48 49 50 51
   if (MPIEXEC)
      set(mpi_exec "${MPIEXEC} ${MPI_NUMPROC_FLAGS} 2")
   else()
      set(mpi_exec "mpirun -n 2")
   endif()
52
   foreach(test ${ParTestdirs})
53
    add_test("FLEUR_MPI:${test}" ${CMAKE_CURRENT_SOURCE_DIR}/tests/test.pl
54
${test} "${CMAKE_BINARY_DIR}/fleur_MPI" "${mpi_exec}")
55 56
   endforeach(test)
endif()
57