Skip to content

Commit

Permalink
ctest: only submit git_branch file if it exists
Browse files Browse the repository at this point in the history
This happens for Travis CI builds where the hash is part of the build
name anyway.

Signed-off-by: Matthias Kretz <kretz@kde.org>
  • Loading branch information
mattkretz committed Jan 5, 2016
1 parent b29801e commit 4c74108
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,10 @@ message("model: ${dashboard_model}")

Set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY_ONCE TRUE)

list(APPEND CTEST_NOTES_FILES
"${CTEST_SOURCE_DIRECTORY}/.git/HEAD"
"${CTEST_SOURCE_DIRECTORY}/.git/refs/heads/${git_branch}"
)
list(APPEND CTEST_NOTES_FILES "${CTEST_SOURCE_DIRECTORY}/.git/HEAD")
if(EXISTS "${CTEST_SOURCE_DIRECTORY}/.git/refs/heads/${git_branch}")
list(APPEND CTEST_NOTES_FILES "${CTEST_SOURCE_DIRECTORY}/.git/refs/heads/${git_branch}")
endif()

include(${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake)
ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
Expand Down

0 comments on commit 4c74108

Please sign in to comment.