Skip to content

Commit

Permalink
Suppress deprecation warnings for unit tests of deprecated functional…
Browse files Browse the repository at this point in the history
…ity (#429)

The only remaining deprecation warnings are for tests that run an grep the
STDOUT for the deprecation warning text and test
TriBITS_CTestDriver_TribitsExMetaProj_version_date that pulls in older
versions of the repos (that still use include_directories()).

In a later commit, I will update the snapshots of the TriBITS example repos to
update the test TriBITS_CTestDriver_TribitsExMetaProj_version_date to make
these deprecation warnings go away.
  • Loading branch information
bartlettroscoe committed Dec 15, 2022
1 parent e7d1e2f commit 3cfe867
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion test/core/TestingFunctionMacro_UnitTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,12 @@ include(AppendStringVar)
function(unittest_append_string_var)

message("\n***")
message("*** Testing append_string_var()")
message("*** Testing append_string_var() (deprecated)")
message("***\n")

# Suppress deprecation warnings
set(TRIBITS_HANDLE_TRIBITS_DEPRECATED_CODE IGNORE)

message("append_string_var(): Testing simple concatenation")
set(SOME_STRING_VAR "")
append_string_var(SOME_STRING_VAR
Expand Down
5 changes: 4 additions & 1 deletion test/core/TribitsAdjustPackageEnables_UnitTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,9 @@ function(unittest_enable_all_st_generate_export_deps_only_ex2package1_se_pkgs)
message("*** Test generation of export dependencies only up to Ex2Package1 with deprecated var <Projecdt>_GENERATE_EXPORT_FILES_FOR_ONLY_LISTED_SE_PACKAGES")
message("***\n")

# Suppress deprecation warnings
set(TRIBITS_HANDLE_TRIBITS_DEPRECATED_CODE IGNORE)

# Debugging
#set(${PROJECT_NAME}_VERBOSE_CONFIGURE ON)
#set(${PROJECT_NAME}_DUMP_PACKAGE_DEPENDENCIES ON)
Expand All @@ -387,7 +390,7 @@ function(unittest_enable_all_st_generate_export_deps_only_ex2package1_se_pkgs)
set(${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE ON)
set(${PROJECT_NAME}_GENERATE_EXPORT_FILE_DEPENDENCIES ON)
set(${PROJECT_NAME}_GENERATE_EXPORT_FILES_FOR_ONLY_LISTED_SE_PACKAGES
Ex2Package1 RTOp)
Ex2Package1 RTOp) # Deprecated!

unittest_helper_read_and_process_packages()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ function(unitest_tribits_set_ss_for_dev_mode_backward_compatible)
message("*** Testing tribits_set_ss_for_dev_mode() backward compatibility")
message("***\n")

# Suppress deprecation warnings
set(TRIBITS_HANDLE_TRIBITS_DEPRECATED_CODE IGNORE)

message("\nTest in dev mode, ST off ...")
set(${PROJECT_NAME}_ENABLE_DEVELOPMENT_MODE ON)
set(${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE OFF)
Expand Down

0 comments on commit 3cfe867

Please sign in to comment.