CMakeLists.txt 1.38 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 9 10

set(Testdirs ${SerialParallelTests} ${SerialOnlyTests})
set(ParTestdirs ${SerialParallelTests})
11 12 13

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

Gregor Michalicek's avatar
Gregor Michalicek committed
18 19
#Add Wannier tests if fleur is compiled with Wannier support
if (${FLEUR_USE_WANN})
20 21
    set(Testdirs ${Testdirs} Cwann CwannXML)
    set(ParTestdirs ${ParTestdirs} Cwann CwannXML)
Gregor Michalicek's avatar
Gregor Michalicek committed
22
endif()
23

Daniel Wortmann's avatar
Daniel Wortmann committed
24
#The serial tests
25
if (${FLEUR_USE_SERIAL})
Daniel Wortmann's avatar
Daniel Wortmann committed
26
   foreach(test ${Testdirs})
27
    add_test("FLEUR:${test}" ${CMAKE_CURRENT_SOURCE_DIR}/tests/test.pl ${test} "${CMAKE_BINARY_DIR}/fleur")
Daniel Wortmann's avatar
Daniel Wortmann committed
28 29 30 31
   endforeach(test)
endif()

#The parallel tests
32
if (${FLEUR_USE_MPI})
33 34 35 36 37
   if (MPIEXEC)
      set(mpi_exec "${MPIEXEC} ${MPI_NUMPROC_FLAGS} 2")
   else()
      set(mpi_exec "mpirun -n 2")
   endif()
38
   foreach(test ${ParTestdirs})
39
    add_test("FLEUR_MPI:${test}" ${CMAKE_CURRENT_SOURCE_DIR}/tests/test.pl
40
${test} "${CMAKE_BINARY_DIR}/fleur_MPI" "${mpi_exec}")
Daniel Wortmann's avatar
Daniel Wortmann committed
41 42
   endforeach(test)
endif()