Skip to content

Commit

Permalink
Have 'dashboard' target set CTEST_UPDATE_VERSION_ONLY=TRUE
Browse files Browse the repository at this point in the history
This will post the base repo version info to CDash which provides more info
right on CDash on the main index.php page.

However, it will set CTEST_DO_UPDATES=OFF unless the base repo is a Git repo
and we can extract the SHA1 from the repo with tribits_git_repo_sha1() (which
is a very robust function).
  • Loading branch information
bartlettroscoe committed Jun 6, 2022
1 parent 4354ed0 commit e5e9be8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/ctest_driver/TribitsExampleProject/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ tribits_add_advanced_test( CTestDriver_PBP_Dashboard_ST_ALL_PASS
"Running package-by-package experimental dashboard"
"A[)] Clean out the list of packages"
"B[)] Run the dashboard command setting the list of packages"
"Running: env TRIBITS_PROJECT_ROOT=.*/tribits/examples/TribitsExampleProject TribitsExProj_TRIBITS_DIR=.*/tribits TribitsExProj_WARNINGS_AS_ERRORS_FLAGS='' TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=ON TribitsExProj_CTEST_DO_ALL_AT_ONCE=FALSE CTEST_DO_COVERAGE_TESTING=OFF CTEST_DO_SUBMIT=.* CTEST_DROP_METHOD=.* CTEST_DROP_SITE=.* CTEST_DROP_LOCATION=.* TribitsExProj_EXTRAREPOS_FILE=.*/tribits/examples/TribitsExampleProject/cmake/ExtraRepositoriesList.cmake TribitsExProj_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE= TribitsExProj_IGNORE_MISSING_EXTRA_REPOSITORIES=FALSE TribitsExProj_EXTRA_REPOSITORIES= TribitsExProj_PACKAGES=SimpleCxx[;]MixedLang[;]WithSubpackagesA[;]WithSubpackagesB[;]WithSubpackagesC[;]WithSubpackages[;]WrapExternal PROJECT_SOURCE_DIR=.*/tribits/examples/TribitsExampleProject .*/bin/ctest -V -S .*/tribits/ctest_driver/experimental_build_test.cmake"
"Running: env TRIBITS_PROJECT_ROOT=.*/tribits/examples/TribitsExampleProject TribitsExProj_TRIBITS_DIR=.*/tribits TribitsExProj_WARNINGS_AS_ERRORS_FLAGS='' TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=ON CTEST_DO_UPDATES=OFF TribitsExProj_CTEST_DO_ALL_AT_ONCE=FALSE CTEST_DO_COVERAGE_TESTING=OFF CTEST_DO_SUBMIT=.* CTEST_DROP_METHOD=.* CTEST_DROP_SITE=.* CTEST_DROP_LOCATION=.* TribitsExProj_EXTRAREPOS_FILE=.*/tribits/examples/TribitsExampleProject/cmake/ExtraRepositoriesList.cmake TribitsExProj_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE= TribitsExProj_IGNORE_MISSING_EXTRA_REPOSITORIES=FALSE TribitsExProj_EXTRA_REPOSITORIES= TribitsExProj_PACKAGES=SimpleCxx[;]MixedLang[;]WithSubpackagesA[;]WithSubpackagesB[;]WithSubpackagesC[;]WithSubpackages[;]WrapExternal PROJECT_SOURCE_DIR=.*/tribits/examples/TribitsExampleProject .*/bin/ctest -V -S .*/tribits/ctest_driver/experimental_build_test.cmake"
"-- ENV_TribitsExProj_ENABLE_SECONDARY_TESTED_CODE='ON'"
"TribitsExProj_ENABLE_SECONDARY_TESTED_CODE='ON'"
"Final set of packages to be explicitly processed by CTest/CDash: SimpleCxx MixedLang WithSubpackages WrapExternal 4"
Expand Down Expand Up @@ -785,7 +785,7 @@ tribits_add_advanced_test( CTestDriver_AAO_Dashboard_ForwardArgs
CTEST_DASHBOARD_ROOT=
make dashboard
PASS_REGULAR_EXPRESSION_ALL
"Running: env TRIBITS_PROJECT_ROOT=.*/tribits/examples/TribitsExampleProject TribitsExProj_TRIBITS_DIR=.*/tribits TribitsExProj_WARNINGS_AS_ERRORS_FLAGS='' TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=OFF TribitsExProj_CTEST_DO_ALL_AT_ONCE=TRUE CTEST_BUILD_NAME=MyCustomBuildName CTEST_DO_COVERAGE_TESTING=FALSE CTEST_BUILD_FLAGS='-j6' CTEST_PARALLEL_LEVEL=10 CTEST_DO_SUBMIT=FALSE CTEST_DROP_METHOD=OFF CTEST_DROP_SITE=OFF CTEST_DROP_LOCATION=OFF CTEST_DROP_SITE_COVERAGE=FALSE CTEST_DROP_LOCATION_COVERAGE=FALSE TRIBITS_2ND_CTEST_DROP_LOCATION=FALSE TRIBITS_2ND_CTEST_DROP_SITE=FALSE TribitsExProj_EXTRAREPOS_FILE=FALSE TribitsExProj_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=NONE TribitsExProj_IGNORE_MISSING_EXTRA_REPOSITORIES=TRUE TribitsExProj_EXTRA_REPOSITORIES=DummyRepo1,DummyRepo2,DummyRepo3 TribitsExProj_PACKAGES=${TribitsExProj_PACKAGES_list} PROJECT_SOURCE_DIR=.*/tribits/examples/TribitsExampleProject .*/ctest -VV -S .*/tribits/ctest_driver/experimental_build_test.cmake"
"Running: env TRIBITS_PROJECT_ROOT=.*/tribits/examples/TribitsExampleProject TribitsExProj_TRIBITS_DIR=.*/tribits TribitsExProj_WARNINGS_AS_ERRORS_FLAGS='' TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=OFF CTEST_DO_UPDATES=OFF TribitsExProj_CTEST_DO_ALL_AT_ONCE=TRUE CTEST_BUILD_NAME=MyCustomBuildName CTEST_DO_COVERAGE_TESTING=FALSE CTEST_BUILD_FLAGS='-j6' CTEST_PARALLEL_LEVEL=10 CTEST_DO_SUBMIT=FALSE CTEST_DROP_METHOD=OFF CTEST_DROP_SITE=OFF CTEST_DROP_LOCATION=OFF CTEST_DROP_SITE_COVERAGE=FALSE CTEST_DROP_LOCATION_COVERAGE=FALSE TRIBITS_2ND_CTEST_DROP_LOCATION=FALSE TRIBITS_2ND_CTEST_DROP_SITE=FALSE TribitsExProj_EXTRAREPOS_FILE=FALSE TribitsExProj_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=NONE TribitsExProj_IGNORE_MISSING_EXTRA_REPOSITORIES=TRUE TribitsExProj_EXTRA_REPOSITORIES=DummyRepo1,DummyRepo2,DummyRepo3 TribitsExProj_PACKAGES=${TribitsExProj_PACKAGES_list} PROJECT_SOURCE_DIR=.*/tribits/examples/TribitsExampleProject .*/ctest -VV -S .*/tribits/ctest_driver/experimental_build_test.cmake"

"ENV_PROJECT_SOURCE_DIR='.*/tribits/examples/TribitsExampleProject'"
"ENV_CTEST_BUILD_NAME='MyCustomBuildName'"
Expand Down
10 changes: 10 additions & 0 deletions tribits/ctest_driver/TribitsAddDashboardTarget.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@
# @HEADER


################################################################################
#
# This file gets included in the main TriBITS framework. It is put here to
# reduce the size of the tribits/core/ directory.
#
################################################################################

include(TribitsGitRepoVersionInfo)

#
# Macro that drives a experimental 'dashboard' target
Expand Down Expand Up @@ -95,6 +98,13 @@ macro(tribits_add_dashboard_target)
append_set(EXPR_CMND_ARGS "${PROJECT_NAME}_WARNINGS_AS_ERRORS_FLAGS='${${PROJECT_NAME}_WARNINGS_AS_ERRORS_FLAGS}'")
append_set(EXPR_CMND_ARGS "${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE=${${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE}")

# Determine if base repo is a git repo (by seeing if SHA1 can be extracted)
tribits_git_repo_sha1("${PROJECT_SOURCE_DIR}" projectGitRepoSha1
FAILURE_MESSAGE_OUT projectGitRepoSha1FailureMsg)
if (projectGitRepoSha1 STREQUAL "")
append_set(EXPR_CMND_ARGS "CTEST_DO_UPDATES=OFF")
endif()

# Conditionally override options used only for the 'dashboard' target.
# These options have no use in a a basic build/test so we don't want to
# interfere with options users might set on the env.
Expand Down
2 changes: 1 addition & 1 deletion tribits/ctest_driver/experimental_build_test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ include(SetDefaultAndFromEnv)

# All these can be changed by env vars
set(CTEST_TEST_TYPE Experimental)
set(CTEST_DO_UPDATES FALSE)
set(CTEST_UPDATE_VERSION_ONLY TRUE)
set(${PROJECT_NAME}_WARNINGS_AS_ERRORS_FLAGS "-Werror")

# Don't change these in the env!
Expand Down

0 comments on commit e5e9be8

Please sign in to comment.