66 lines
2.6 KiB
Diff
66 lines
2.6 KiB
Diff
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
|
|
|