hip: fix broken tests with ^cmake@3.21: (#25246)
This commit is contained in:
parent
4384ff8e41
commit
c37aee4620
@ -0,0 +1,53 @@
|
|||||||
|
From 52f389bc39e6f3d1eb76225a82c23312dd6006ee Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harmen Stoppels <harmenstoppels@gmail.com>
|
||||||
|
Date: Wed, 4 Aug 2021 15:12:10 +0200
|
||||||
|
Subject: [PATCH] tests
|
||||||
|
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 30 ------------------------------
|
||||||
|
1 file changed, 30 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 4a34b02..37e1c3f 100755
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -641,36 +641,6 @@ if(CLANGFORMAT_EXE)
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
-#############################
|
||||||
|
-# Testing steps
|
||||||
|
-#############################
|
||||||
|
-# Target: test
|
||||||
|
-set(HIP_ROOT_DIR ${CMAKE_INSTALL_PREFIX})
|
||||||
|
-set(HIP_SRC_PATH ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
-execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/cmake" "${HIP_ROOT_DIR}/cmake" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||||
|
-if(${RUN_HIT} EQUAL 0)
|
||||||
|
- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/bin" "${HIP_ROOT_DIR}/bin" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||||
|
-endif()
|
||||||
|
-if(${RUN_HIT} EQUAL 0)
|
||||||
|
- set(CMAKE_MODULE_PATH "${HIP_ROOT_DIR}/cmake" ${CMAKE_MODULE_PATH})
|
||||||
|
- include(${HIP_SRC_PATH}/tests/hit/HIT.cmake)
|
||||||
|
-
|
||||||
|
- # Add tests
|
||||||
|
- include_directories(${HIP_SRC_PATH}/tests/src)
|
||||||
|
- hit_add_directory_recursive(${HIP_SRC_PATH}/tests/src "directed_tests")
|
||||||
|
-
|
||||||
|
- # Add unit tests
|
||||||
|
- include_directories(${HIP_SRC_PATH}/tests/unit)
|
||||||
|
- hit_add_directory_recursive(${HIP_SRC_PATH}/tests/unit "unit_tests")
|
||||||
|
-
|
||||||
|
- # Add top-level tests to build_tests
|
||||||
|
- add_custom_target(build_tests DEPENDS directed_tests unit_tests)
|
||||||
|
-
|
||||||
|
- # Add custom target: check
|
||||||
|
- add_custom_target(check COMMAND "${CMAKE_COMMAND}" --build . --target test DEPENDS build_tests)
|
||||||
|
-else()
|
||||||
|
- message(STATUS "Testing targets will not be available. To enable them please ensure that the HIP installation directory is writeable. Use -DCMAKE_INSTALL_PREFIX to specify a suitable location")
|
||||||
|
-endif()
|
||||||
|
|
||||||
|
#############################
|
||||||
|
# Code analysis
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
@ -0,0 +1,65 @@
|
|||||||
|
From 400797728d50d335c2399bc44ab2b1330d0c6dc4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harmen Stoppels <harmenstoppels@gmail.com>
|
||||||
|
Date: Wed, 4 Aug 2021 15:10:00 +0200
|
||||||
|
Subject: [PATCH] tests
|
||||||
|
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 42 ------------------------------------------
|
||||||
|
1 file changed, 42 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 055543a..7e408b6 100755
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -661,48 +661,6 @@ if(CLANGFORMAT_EXE)
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
-#############################
|
||||||
|
-# Testing steps
|
||||||
|
-#############################
|
||||||
|
-# Target: test
|
||||||
|
-set(HIP_ROOT_DIR ${CMAKE_INSTALL_PREFIX})
|
||||||
|
-set(HIP_SRC_PATH ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
-execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/cmake" "${HIP_ROOT_DIR}/cmake" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||||
|
-if(${RUN_HIT} EQUAL 0)
|
||||||
|
- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/bin" "${HIP_ROOT_DIR}/bin" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||||
|
-endif()
|
||||||
|
-if(${RUN_HIT} EQUAL 0)
|
||||||
|
- set(CMAKE_MODULE_PATH "${HIP_ROOT_DIR}/cmake" ${CMAKE_MODULE_PATH})
|
||||||
|
- include(${HIP_SRC_PATH}/tests/hit/HIT.cmake)
|
||||||
|
-
|
||||||
|
- # Add tests
|
||||||
|
- include_directories(${HIP_SRC_PATH}/tests/src)
|
||||||
|
- hit_add_directory_recursive(${HIP_CTEST_CONFIG_DEFAULT} ${HIP_SRC_PATH}/tests/src "directed_tests")
|
||||||
|
-
|
||||||
|
- # Add unit tests
|
||||||
|
- include_directories(${HIP_SRC_PATH}/tests/unit)
|
||||||
|
- hit_add_directory_recursive(${HIP_CTEST_CONFIG_DEFAULT} ${HIP_SRC_PATH}/tests/unit "unit_tests")
|
||||||
|
-
|
||||||
|
- # Add performance tests
|
||||||
|
- include_directories(${HIP_SRC_PATH}/tests/performance)
|
||||||
|
- hit_add_directory_recursive(${HIP_CTEST_CONFIG_PERFORMANCE} ${HIP_SRC_PATH}/tests/performance "performance_tests")
|
||||||
|
-
|
||||||
|
- # Add top-level tests to build_tests
|
||||||
|
- add_custom_target(build_tests DEPENDS directed_tests unit_tests)
|
||||||
|
-
|
||||||
|
- # Add top-level tests to build performance_tests.
|
||||||
|
- # To build performance tests, just run "make build_perf"
|
||||||
|
- add_custom_target(build_perf DEPENDS performance_tests)
|
||||||
|
-
|
||||||
|
- # Add custom target: perf.
|
||||||
|
- # To run performance tests, just run "make perf"
|
||||||
|
- add_custom_target(perf COMMAND "${CMAKE_CTEST_COMMAND}" -C "${HIP_CTEST_CONFIG_PERFORMANCE}" -R "performance_tests/" --verbose)
|
||||||
|
-
|
||||||
|
- # Add custom target: check
|
||||||
|
- add_custom_target(check COMMAND "${CMAKE_COMMAND}" --build . --target test DEPENDS build_tests)
|
||||||
|
-else()
|
||||||
|
- message(STATUS "Testing targets will not be available. To enable them please ensure that the HIP installation directory is writeable. Use -DCMAKE_INSTALL_PREFIX to specify a suitable location")
|
||||||
|
-endif()
|
||||||
|
|
||||||
|
#############################
|
||||||
|
# Code analysis
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
@ -0,0 +1,68 @@
|
|||||||
|
From 823d25faf479a83879a0faf73bf95eaae9ae9fff Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harmen Stoppels <harmenstoppels@gmail.com>
|
||||||
|
Date: Wed, 4 Aug 2021 15:06:53 +0200
|
||||||
|
Subject: [PATCH] Disable testing
|
||||||
|
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 45 ---------------------------------------------
|
||||||
|
1 file changed, 45 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 7831bb4..b8f420c 100755
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -696,51 +696,6 @@ if(CLANGFORMAT_EXE)
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
-#############################
|
||||||
|
-# Testing steps
|
||||||
|
-#############################
|
||||||
|
-# Target: test
|
||||||
|
-set(HIP_ROOT_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
-set(HIP_SRC_PATH ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
-if(HIP_PLATFORM STREQUAL "nvcc")
|
||||||
|
- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/include" "${CMAKE_CURRENT_BINARY_DIR}/include" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||||
|
-endif()
|
||||||
|
-execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/cmake" "${HIP_ROOT_DIR}/cmake" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||||
|
-if(${RUN_HIT} EQUAL 0)
|
||||||
|
- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/bin" "${HIP_ROOT_DIR}/bin" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||||
|
-endif()
|
||||||
|
-if(${RUN_HIT} EQUAL 0)
|
||||||
|
- set(CMAKE_MODULE_PATH "${HIP_ROOT_DIR}/cmake" ${CMAKE_MODULE_PATH})
|
||||||
|
- include(${HIP_SRC_PATH}/tests/hit/HIT.cmake)
|
||||||
|
-
|
||||||
|
- # Add tests
|
||||||
|
- include_directories(${HIP_SRC_PATH}/tests/src)
|
||||||
|
- hit_add_directory_recursive(${HIP_CTEST_CONFIG_DEFAULT} ${HIP_SRC_PATH}/tests/src "directed_tests")
|
||||||
|
-
|
||||||
|
- # Add unit tests
|
||||||
|
- include_directories(${HIP_SRC_PATH}/tests/unit)
|
||||||
|
- hit_add_directory_recursive(${HIP_CTEST_CONFIG_DEFAULT} ${HIP_SRC_PATH}/tests/unit "unit_tests")
|
||||||
|
-
|
||||||
|
- # Add performance tests
|
||||||
|
- include_directories(${HIP_SRC_PATH}/tests/performance)
|
||||||
|
- hit_add_directory_recursive(${HIP_CTEST_CONFIG_PERFORMANCE} ${HIP_SRC_PATH}/tests/performance "performance_tests")
|
||||||
|
-
|
||||||
|
- # Add top-level tests to build_tests
|
||||||
|
- add_custom_target(build_tests DEPENDS directed_tests unit_tests)
|
||||||
|
-
|
||||||
|
- # Add top-level tests to build performance_tests.
|
||||||
|
- # To build performance tests, just run "make build_perf"
|
||||||
|
- add_custom_target(build_perf DEPENDS performance_tests)
|
||||||
|
-
|
||||||
|
- # Add custom target: perf.
|
||||||
|
- # To run performance tests, just run "make perf"
|
||||||
|
- add_custom_target(perf COMMAND "${CMAKE_CTEST_COMMAND}" -C "${HIP_CTEST_CONFIG_PERFORMANCE}" -R "performance_tests/" --verbose)
|
||||||
|
-
|
||||||
|
- # Add custom target: check
|
||||||
|
- add_custom_target(check COMMAND "${CMAKE_COMMAND}" --build . --target test DEPENDS build_tests)
|
||||||
|
-else()
|
||||||
|
- message(STATUS "Testing targets will not be available. To enable them please ensure that the HIP installation directory is writeable. Use -DCMAKE_INSTALL_PREFIX to specify a suitable location")
|
||||||
|
-endif()
|
||||||
|
|
||||||
|
#############################
|
||||||
|
# Code analysis
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
@ -0,0 +1,42 @@
|
|||||||
|
From 0c097d01b70f479acc7c40cde35a057fafa072ba Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harmen Stoppels <harmenstoppels@gmail.com>
|
||||||
|
Date: Wed, 4 Aug 2021 15:00:14 +0200
|
||||||
|
Subject: [PATCH] Disable tests
|
||||||
|
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 19 -------------------
|
||||||
|
1 file changed, 19 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index a059c42..471fa97 100755
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -488,25 +488,6 @@ if(CLANGFORMAT_EXE)
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
-#############################
|
||||||
|
-# Testing steps
|
||||||
|
-#############################
|
||||||
|
-set(HIP_ROOT_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
-set(HIP_SRC_PATH ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
-if(HIP_PLATFORM STREQUAL "nvidia")
|
||||||
|
- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/include" "${HIP_ROOT_DIR}/include" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||||
|
-endif()
|
||||||
|
-execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/cmake" "${HIP_ROOT_DIR}/cmake" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||||
|
-if(${RUN_HIT} EQUAL 0)
|
||||||
|
- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/bin" "${HIP_ROOT_DIR}/bin" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
|
||||||
|
-endif()
|
||||||
|
-if(${RUN_HIT} EQUAL 0)
|
||||||
|
- set(CMAKE_MODULE_PATH "${HIP_ROOT_DIR}/cmake" ${CMAKE_MODULE_PATH})
|
||||||
|
- include(${HIP_SRC_PATH}/tests/hit/HIT.cmake)
|
||||||
|
- include(${HIP_SRC_PATH}/tests/Tests.cmake)
|
||||||
|
-else()
|
||||||
|
- message(STATUS "Testing targets will not be available. To enable them please ensure that the HIP installation directory is writeable. Use -DCMAKE_INSTALL_PREFIX to specify a suitable location")
|
||||||
|
-endif()
|
||||||
|
|
||||||
|
#############################
|
||||||
|
# Code analysis
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
@ -63,10 +63,18 @@ class Hip(CMakePackage):
|
|||||||
patch('0003-Improve-compilation-without-git-repo.3.10.0.patch', when='@3.10.0:4.0.0')
|
patch('0003-Improve-compilation-without-git-repo.3.10.0.patch', when='@3.10.0:4.0.0')
|
||||||
patch('0003-Improve-compilation-without-git-repo.4.1.0.patch', when='@4.1.0')
|
patch('0003-Improve-compilation-without-git-repo.4.1.0.patch', when='@4.1.0')
|
||||||
patch('0003-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.4.2.0.patch', when='@4.2.0')
|
patch('0003-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.4.2.0.patch', when='@4.2.0')
|
||||||
|
|
||||||
# See https://github.com/ROCm-Developer-Tools/HIP/pull/2219
|
# See https://github.com/ROCm-Developer-Tools/HIP/pull/2219
|
||||||
patch('0004-Drop-clang-rt-builtins-linking-on-hip-host.3.7.0.patch', when='@3.7.0:3.9.0')
|
patch('0004-Drop-clang-rt-builtins-linking-on-hip-host.3.7.0.patch', when='@3.7.0:3.9.0')
|
||||||
patch('0004-Drop-clang-rt-builtins-linking-on-hip-host.3.10.0.patch', when='@3.10.0:4.1.0')
|
patch('0004-Drop-clang-rt-builtins-linking-on-hip-host.3.10.0.patch', when='@3.10.0:4.1.0')
|
||||||
|
|
||||||
|
# Tests are broken when using cmake 3.21
|
||||||
|
with when('^cmake@3.21:'):
|
||||||
|
patch('0005-Disable-tests-3.5.0.patch', when='@3.5.0')
|
||||||
|
patch('0005-Disable-tests-3.6.0.patch', when='@3.6.0:3.8.0')
|
||||||
|
patch('0005-Disable-tests-3.9.0.patch', when='@3.9.0:4.0.0')
|
||||||
|
patch('0005-Disable-tests-4.1.0.patch', when='@4.1.0:')
|
||||||
|
|
||||||
def get_paths(self):
|
def get_paths(self):
|
||||||
if self.spec.external:
|
if self.spec.external:
|
||||||
# For external packages we only assume the `hip` prefix is known,
|
# For external packages we only assume the `hip` prefix is known,
|
||||||
|
Loading…
Reference in New Issue
Block a user