Skip to content

Commit

Permalink
systemtests: improve cmake output for adding tests
Browse files Browse the repository at this point in the history
Change status messages to use unicode "check mark" and "ballot x" when
showing if a test was enabled/disabled.
Also prints the directory containing the test now.
  • Loading branch information
pstorz authored and arogge committed Dec 5, 2022
1 parent f3fe0bb commit 6cec9e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions systemtests/cmake/BareosSystemtestFunctions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -500,12 +500,12 @@ function(add_disabled_systemtest PREFIX TEST_NAME)
add_test(NAME ${FULL_TEST_NAME} COMMAND false)
endif()
set_tests_properties(${FULL_TEST_NAME} PROPERTIES DISABLED true)
message(STATUS "Test: ${FULL_TEST_NAME} => disabled (${ARG_COMMENT})")
message(STATUS " ${FULL_TEST_NAME} => disabled (${ARG_COMMENT})")
endfunction()

function(add_systemtest name file)
cmake_parse_arguments(PARSE_ARGV 2 ARG "PYTHON" "WORKING_DIRECTORY" "")
message(STATUS " * ${name}")
message(STATUS " └─ ✓ ${name}")

if(ARG_WORKING_DIRECTORY)
set(directory "${ARG_WORKING_DIRECTORY}")
Expand Down Expand Up @@ -627,7 +627,7 @@ macro(create_systemtest prefix test_subdir)
if(ARG_DISABLED)
add_disabled_systemtest(${prefix} ${test_subdir} COMMENT "${ARG_COMMENT}")
else()
message(STATUS "Test: ${test_basename} (baseport=${BASEPORT})")
message(STATUS " ${test_basename} (baseport=${BASEPORT})")

prepare_test(${test_subdir})
configurefilestosystemtest(
Expand Down
2 changes: 1 addition & 1 deletion systemtests/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.

message("Adding systemtests from ${CMAKE_CURRENT_SOURCE_DIR}")
add_subdirectory(acl)
add_subdirectory(always-incremental-consolidate)
add_subdirectory(autochanger)
Expand Down

0 comments on commit 6cec9e2

Please sign in to comment.