CMakeLists.txt 1009 Bytes
Newer Older
1 2
enable_testing()

Gregor Michalicek's avatar
Gregor Michalicek committed
3 4 5 6
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
GaAsMultiUForceXML TiO2eels) 
7 8 9 10 11 12 13 14

#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()



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

#The parallel tests
23
if (${FLEUR_USE_MPI})
24 25 26 27 28
   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
29
   foreach(test ${Testdirs})
30
    add_test("FLEUR_MPI:${test}" ${CMAKE_CURRENT_SOURCE_DIR}/tests/test.pl
31
${test} "${CMAKE_BINARY_DIR}/fleur_MPI" "${mpi_exec}")
Daniel Wortmann's avatar
Daniel Wortmann committed
32 33
   endforeach(test)
endif()