-
Notifications
You must be signed in to change notification settings - Fork 53
Correct install_relocatable issues found by libcudf #423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rapids-bot
merged 2 commits into
rapidsai:branch-23.08
from
robertmaynard:bug/correct_bugs_found_by_libcudf
Jun 8, 2023
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#============================================================================= | ||
# Copyright (c) 2023, NVIDIA CORPORATION. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
#============================================================================= | ||
cmake_minimum_required(VERSION 3.20) | ||
set(CMAKE_CONFIGURATION_TYPES Debug) | ||
project(rapids-test-project LANGUAGES CUDA) | ||
|
||
include(${rapids-cmake-dir}/rapids-test.cmake) | ||
|
||
add_library(preload SHARED usage.cu) | ||
robertmaynard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
add_subdirectory(tests) | ||
|
||
install(TARGETS preload DESTINATION lib) |
61 changes: 61 additions & 0 deletions
61
testing/test/install_relocatable-complex/tests/CMakeLists.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#============================================================================= | ||
# Copyright (c) 2023, NVIDIA CORPORATION. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
#============================================================================= | ||
|
||
include(${rapids-cmake-dir}/rapids-test.cmake) | ||
|
||
enable_testing() | ||
rapids_test_init() | ||
|
||
rapids_test_add(NAME verify_ COMMAND ls GPUS 1 INSTALL_COMPONENT_SET testing) | ||
set_tests_properties( | ||
verify_ | ||
PROPERTIES | ||
ENVIRONMENT | ||
"STREAM_MODE=new_mode;LD_PRELOAD=$<TARGET_FILE:preload>" | ||
) | ||
|
||
rapids_test_install_relocatable(INSTALL_COMPONENT_SET testing | ||
DESTINATION bin/testing | ||
INCLUDE_IN_ALL) | ||
|
||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/verify_installed_CTestTestfile.cmake" | ||
"set(installed_test_file \"${CMAKE_CURRENT_BINARY_DIR}/install/bin/testing/CTestTestfile.cmake\")") | ||
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/verify_installed_CTestTestfile.cmake" | ||
[==[ | ||
|
||
file(READ "${installed_test_file}" contents) | ||
set(execute_process_match_string [===[execute_process(COMMAND ./generate_ctest_json OUTPUT_FILE "${CTEST_RESOURCE_SPEC_FILE}")]===]) | ||
string(FIND "${contents}" ${execute_process_match_string} is_found) | ||
if(is_found EQUAL -1) | ||
message(FATAL_ERROR "Failed to generate a `execute_process` with escaped CTEST_RESOURCE_SPEC_FILE") | ||
endif() | ||
|
||
set(properties_match_strings [===[PROPERTIES ENVIRONMENT "STREAM_MODE]===] | ||
[===[LD_PRELOAD=${CMAKE_INSTALL_PREFIX}/lib/libpreload]===]) | ||
foreach(to_match IN LISTS properties_match_strings) | ||
string(FIND "${contents}" ${to_match} is_found) | ||
if(is_found EQUAL -1) | ||
message(FATAL_ERROR "${contents}\nFailed to generate a proper set of test properties") | ||
endif() | ||
endforeach() | ||
]==]) | ||
|
||
add_custom_target(install_testing_component ALL | ||
COMMAND ${CMAKE_COMMAND} --install "${CMAKE_BINARY_DIR}" --prefix install/ --config Debug | ||
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/verify_installed_CTestTestfile.cmake" | ||
) | ||
|
||
add_dependencies(install_testing_component preload) |
Empty file.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.