From d47956f83daf02f1007f3a776c47b3cac14ff83a Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Wed, 20 Jul 2022 18:00:37 -0700 Subject: [PATCH 1/4] Add --output-on-failure to ctest args. --- cpp/tests/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index a1e3cfed286..c414d6bef7a 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -12,6 +12,10 @@ # the License. # ============================================================================= +# Always print verbose output when tests fail if run using `make test`. +list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure") +set(CMAKE_CTEST_ARGUMENTS "${CMAKE_CTEST_ARGUMENTS}" PARENT_SCOPE) + # ################################################################################################## # * compiler function ----------------------------------------------------------------------------- From 215d2df1d03758355c8864b12c09b8b391cea18a Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Thu, 21 Jul 2022 09:20:00 -0700 Subject: [PATCH 2/4] Fix style. --- cpp/tests/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index c414d6bef7a..936e247487e 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -14,7 +14,10 @@ # Always print verbose output when tests fail if run using `make test`. list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure") -set(CMAKE_CTEST_ARGUMENTS "${CMAKE_CTEST_ARGUMENTS}" PARENT_SCOPE) +set(CMAKE_CTEST_ARGUMENTS + "${CMAKE_CTEST_ARGUMENTS}" + PARENT_SCOPE +) # ################################################################################################## # * compiler function ----------------------------------------------------------------------------- From 0cc83aa9d64f99199e318fcfc754c5894f558e14 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Thu, 21 Jul 2022 14:47:59 -0700 Subject: [PATCH 3/4] Move logic to top-level CMakeLists.txt. --- cpp/CMakeLists.txt | 2 ++ cpp/tests/CMakeLists.txt | 7 ------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 0903609c1e2..3acb38cea3a 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -711,6 +711,8 @@ add_library(cudf::cudftestutil ALIAS cudftestutil) if(CUDF_BUILD_TESTS) # include CTest module -- automatically calls enable_testing() include(CTest) + # Always print verbose output when tests fail if run using `make test`. + list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure") add_subdirectory(tests) endif() diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index 936e247487e..a1e3cfed286 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -12,13 +12,6 @@ # the License. # ============================================================================= -# Always print verbose output when tests fail if run using `make test`. -list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure") -set(CMAKE_CTEST_ARGUMENTS - "${CMAKE_CTEST_ARGUMENTS}" - PARENT_SCOPE -) - # ################################################################################################## # * compiler function ----------------------------------------------------------------------------- From be459f3cbe3df33e0bcbf7be36d77a94b42e634f Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Thu, 21 Jul 2022 14:52:01 -0700 Subject: [PATCH 4/4] Update format. --- cpp/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 3acb38cea3a..6f8b98a0e0f 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -711,8 +711,8 @@ add_library(cudf::cudftestutil ALIAS cudftestutil) if(CUDF_BUILD_TESTS) # include CTest module -- automatically calls enable_testing() include(CTest) - # Always print verbose output when tests fail if run using `make test`. - list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure") + # Always print verbose output when tests fail if run using `make test`. + list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure") add_subdirectory(tests) endif()