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

Gregor Michalicek's avatar
Gregor Michalicek committed
3 4 5
set(Testdirs CuBulk CuBulkXML Fe_1l Fe_1lXML Fe-Atom CuBand CuBandXML CuDOS
CuDOSXML Fe_bct_LO Fe_bct_LOXML Fe_bct Fe_bctXML PTO PTOXML Fe_fcc Fe_fccXML
Fe_1l_SOC Fe_1l_SOCXML PTO-SOC PTO-SOCXML Fe_bct_SOC Fe_bct_SOCXML
6
GaAsMultiUForceXML TiO2eels SiFilmSlicePlotXML) 
7 8 9 10 11 12

#Check if all tests (including those running for a long time) should be executed
if (all_tests)
    set(Testdirs ${Testdirs} Bi2Te3 Bi2Te3XML NiO_ldau NiO_ldauXML)
endif()

Gregor Michalicek's avatar
Gregor Michalicek committed
13 14 15 16
#Add Wannier tests if fleur is compiled with Wannier support
if (${FLEUR_USE_WANN})
    set(Testdirs ${Testdirs} Cwann)
endif()
17

Daniel Wortmann's avatar
Daniel Wortmann committed
18
#The serial tests
19
if (${FLEUR_USE_SERIAL})
Daniel Wortmann's avatar
Daniel Wortmann committed
20
   foreach(test ${Testdirs})
21
    add_test("FLEUR:${test}" ${CMAKE_CURRENT_SOURCE_DIR}/tests/test.pl ${test} "${CMAKE_BINARY_DIR}/fleur")
Daniel Wortmann's avatar
Daniel Wortmann committed
22 23 24 25
   endforeach(test)
endif()

#The parallel tests
26
if (${FLEUR_USE_MPI})
27 28 29 30 31
   if (MPIEXEC)
      set(mpi_exec "${MPIEXEC} ${MPI_NUMPROC_FLAGS} 2")
   else()
      set(mpi_exec "mpirun -n 2")
   endif()
Daniel Wortmann's avatar
Daniel Wortmann committed
32
   foreach(test ${Testdirs})
33
    add_test("FLEUR_MPI:${test}" ${CMAKE_CURRENT_SOURCE_DIR}/tests/test.pl
34
${test} "${CMAKE_BINARY_DIR}/fleur_MPI" "${mpi_exec}")
Daniel Wortmann's avatar
Daniel Wortmann committed
35 36
   endforeach(test)
endif()