[PATCH] D51663: [test-suite, CUDA] Update CUDA test suite cmake files.
Artem Belevich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 4 16:44:39 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL341430: [test-suite, CUDA] Update CUDA cmake files. (authored by tra, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D51663
Files:
test-suite/trunk/External/CUDA/CMakeLists.txt
test-suite/trunk/cmake/modules/TestSuite.cmake
Index: test-suite/trunk/External/CUDA/CMakeLists.txt
===================================================================
--- test-suite/trunk/External/CUDA/CMakeLists.txt
+++ test-suite/trunk/External/CUDA/CMakeLists.txt
@@ -57,14 +57,21 @@
cuda_glob(_sources ${FileGlob})
set(_executable ${Name}-${VariantSuffix})
set(_executable_path ${CMAKE_CURRENT_BINARY_DIR}/${_executable})
+ llvm_test_run()
+ set(REFERENCE_OUTPUT)
# Verify reference output if it exists.
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${Name}.reference_output)
- llvm_test_traditional(${Name})
+ set(REFERENCE_OUTPUT ${Name}.reference_output)
+ llvm_test_verify(WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
+ ${FPCMP} %o ${REFERENCE_OUTPUT}-${VariantSuffix}
+ )
+ llvm_test_executable(${_executable} ${_sources})
+ llvm_test_data(${_executable}
+ DEST_SUFFIX "-${VariantSuffix}"
+ ${REFERENCE_OUTPUT})
else()
- # otherwise just run the executable.
- llvm_test_run()
+ llvm_test_executable(${_executable} ${_sources})
endif()
- llvm_test_executable(${_executable} ${_sources})
target_compile_options(${_executable} PUBLIC ${VariantCPPFLAGS})
if(VariantLibs)
target_link_libraries(${_executable} ${VariantLibs})
Index: test-suite/trunk/cmake/modules/TestSuite.cmake
===================================================================
--- test-suite/trunk/cmake/modules/TestSuite.cmake
+++ test-suite/trunk/cmake/modules/TestSuite.cmake
@@ -18,26 +18,28 @@
# directory of the benchmark executable.
# Paths are interepreted relative to CMAKE_CURRENT_SOURCE_DIR by default but
# this can be changed with the SOURCE_DIR argument.
+# If DEST_SUFFIX is specified, it's appended to the destination file names.
function(llvm_test_data target)
- cmake_parse_arguments(_LTDARGS "MUST_COPY" "SOURCE_DIR" "" ${ARGN})
+ cmake_parse_arguments(_LTDARGS "MUST_COPY" "SOURCE_DIR;DEST_SUFFIX" "" ${ARGN})
set(SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
if(_LTDARGS_SOURCE_DIR)
set(SOURCE_DIR ${_LTDARGS_SOURCE_DIR})
endif()
+ set(SUFFIX ${_LTDARGS_DEST_SUFFIX})
foreach(file ${_LTDARGS_UNPARSED_ARGUMENTS})
set(full_path ${SOURCE_DIR}/${file})
if(_LTDARGS_MUST_COPY OR TEST_SUITE_COPY_DATA)
if(IS_DIRECTORY ${full_path})
- llvm_copy_dir(${target} $<TARGET_FILE_DIR:${target}>/${file} ${full_path})
+ llvm_copy_dir(${target} $<TARGET_FILE_DIR:${target}>/${file}${SUFFIX} ${full_path})
else()
- llvm_copy(${target} $<TARGET_FILE_DIR:${target}>/${file} ${full_path})
+ llvm_copy(${target} $<TARGET_FILE_DIR:${target}>/${file}${SUFFIX} ${full_path})
endif()
else()
get_filename_component(file_subdir ${file} DIRECTORY)
if(file_subdir)
llvm_make_directory(${target} ${file_subdir})
endif()
- llvm_create_symlink(${target} $<TARGET_FILE_DIR:${target}>/${file} ${full_path})
+ llvm_create_symlink(${target} $<TARGET_FILE_DIR:${target}>/${file}${SUFFIX} ${full_path})
endif()
endforeach()
endfunction()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51663.163947.patch
Type: text/x-patch
Size: 3117 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180904/cdbdd664/attachment.bin>
More information about the llvm-commits
mailing list