You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

75 lines
2.6 KiB

  1. ## The directory to run ctest in.
  2. set(CTEST_DIRECTORY "$ENV{HOME}/workspace/tmp/dashboards/cmocka")
  3. ## The hostname of the machine
  4. set(CTEST_SITE "host.cmocka.org")
  5. ## The buildname
  6. set(CTEST_BUILD_NAME "Linux_GCC_x86_64_default")
  7. ## The Makefile generator to use
  8. set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
  9. ## The Build configuration to use.
  10. set(CTEST_BUILD_CONFIGURATION "Debug")
  11. ## The build options for the project
  12. set(CTEST_BUILD_OPTIONS "-DUNIT_TESTING=ON -DWITH_CMOCKERY_SUPPORT=ON")
  13. #set(CTEST_CUSTOM_MEMCHECK_IGNORE torture_rand)
  14. ## The Model to set: Nightly, Continous, Experimental
  15. set(CTEST_MODEL "Experimental")
  16. ## The URL to the git repository
  17. set(CTEST_GIT_REPOSITORY "git://git.cryptomilk.org/projects/cmocka.git")
  18. ## The branch
  19. #set(CTEST_GIT_BRANCH "--branch v0-5")
  20. ## Wether to enable memory checking.
  21. set(WITH_MEMCHECK FALSE)
  22. ## Wether to enable code coverage.
  23. set(WITH_COVERAGE FALSE)
  24. #######################################################################
  25. if (WITH_COVERAGE AND NOT WIN32)
  26. set(CTEST_BUILD_CONFIGURATION "Profiling")
  27. endif (WITH_COVERAGE AND NOT WIN32)
  28. set(CTEST_SOURCE_DIRECTORY "${CTEST_DIRECTORY}/${CTEST_BUILD_NAME}/source")
  29. set(CTEST_BINARY_DIRECTORY "${CTEST_DIRECTORY}/${CTEST_BUILD_NAME}/build")
  30. set(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE ${CMAKE_SOURCE_DIR}/tests/valgrind.supp)
  31. find_program(CTEST_GIT_COMMAND NAMES git)
  32. find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
  33. find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
  34. if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
  35. set(CTEST_CHECKOUT_COMMAND "${CTEST_GIT_COMMAND} clone ${CTEST_GIT_BRANCH} ${CTEST_GIT_REPOSITORY} ${CTEST_SOURCE_DIRECTORY}")
  36. endif()
  37. set(CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
  38. set(CTEST_CONFIGURE_COMMAND "${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION}")
  39. set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} ${CTEST_BUILD_OPTIONS}")
  40. set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"-G${CTEST_CMAKE_GENERATOR}\"")
  41. set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"${CTEST_SOURCE_DIRECTORY}\"")
  42. ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
  43. ctest_start(${CTEST_MODEL} TRACK ${CTEST_MODEL})
  44. ctest_update(SOURCE ${CTEST_SOURCE_DIRECTORY})
  45. ctest_configure(BUILD ${CTEST_BINARY_DIRECTORY})
  46. ctest_build(BUILD ${CTEST_BINARY_DIRECTORY})
  47. ctest_test(BUILD ${CTEST_BINARY_DIRECTORY})
  48. if (WITH_MEMCHECK AND CTEST_COVERAGE_COMMAND)
  49. ctest_coverage(BUILD ${CTEST_BINARY_DIRECTORY})
  50. endif (WITH_MEMCHECK AND CTEST_COVERAGE_COMMAND)
  51. if (WITH_MEMCHECK AND CTEST_MEMORYCHECK_COMMAND)
  52. ctest_memcheck(BUILD ${CTEST_BINARY_DIRECTORY})
  53. endif (WITH_MEMCHECK AND CTEST_MEMORYCHECK_COMMAND)
  54. ctest_submit()