CMakeLists.txt 1.7 KB
Newer Older
1 2
enable_testing()

3 4 5 6
set(SerialParallelTests CuBulk CuBulkXML Fe_1l Fe_1lXML Fe-Atom CuBand CuBandXML CuDOS CuDOSXML
Fe_bct Fe_bctXML PTO PTOXML Fe_1l_SOC Fe_1l_SOCXML PTO-SOC PTO-SOCXML Fe_bct_SOC Fe_bct_SOCXML
GaAsMultiUForceXML SiFilmSlicePlotXML)

7
set(SerialOnlyTests Fe_bct_LO Fe_bct_LOXML Fe_fcc Fe_fccXML 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 17
    set(Testdirs ${Testdirs} Bi2Te3 Bi2Te3XML NiO_ldauXML)
    set(ParTestdirs ${Testdirs} 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()

Gregor Michalicek's avatar
Gregor Michalicek committed
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)
Gregor Michalicek's avatar
Gregor Michalicek committed
31
endif()
32

33
#The serial tests
34
if (${FLEUR_USE_SERIAL})
35
   foreach(test ${Testdirs})
36
    add_test("FLEUR:${test}" ${CMAKE_CURRENT_SOURCE_DIR}/tests/test.pl ${test} "${CMAKE_BINARY_DIR}/fleur")
37 38 39 40
   endforeach(test)
endif()

#The parallel tests
41
if (${FLEUR_USE_MPI})
42 43 44 45 46
   if (MPIEXEC)
      set(mpi_exec "${MPIEXEC} ${MPI_NUMPROC_FLAGS} 2")
   else()
      set(mpi_exec "mpirun -n 2")
   endif()
47
   foreach(test ${ParTestdirs})
48
    add_test("FLEUR_MPI:${test}" ${CMAKE_CURRENT_SOURCE_DIR}/tests/test.pl
49
${test} "${CMAKE_BINARY_DIR}/fleur_MPI" "${mpi_exec}")
50 51
   endforeach(test)
endif()