-
Notifications
You must be signed in to change notification settings - Fork 73
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
Add TestHarness python integration scripts to dev package #818
Changes from 11 commits
f81921a
0a1ec82
6f16347
d56b97e
b2db52d
d55b043
315874a
c8d36c2
38f8c59
be154da
b6007e0
61b0efe
08b1eb5
8c8ad50
9c066a7
c46400c
7d78b88
e7e66a5
3e9d098
d6e6a93
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,7 @@ set(CPACK_DEBIAN_BASE_FILE_NAME "${CPACK_DEBIAN_FILE_NAME}.deb") | |
string(REGEX REPLACE "^(${CMAKE_PROJECT_NAME})" "\\1-dev" CPACK_DEBIAN_DEV_FILE_NAME "${CPACK_DEBIAN_BASE_FILE_NAME}") | ||
|
||
#deb package tooling will be unable to detect deps for the dev package. llvm is tricky since we don't know what package could have been used; try to figure it out | ||
set(CPACK_DEBIAN_DEV_PACKAGE_DEPENDS "libboost-all-dev, libssl-dev, libgmp-dev") | ||
set(CPACK_DEBIAN_DEV_PACKAGE_DEPENDS "libboost-all-dev, libssl-dev, libgmp-dev, python3-numpy") | ||
find_program(DPKG_QUERY "dpkg-query") | ||
if(DPKG_QUERY AND OS_RELEASE MATCHES "\n?ID=\"?ubuntu" AND LLVM_CMAKE_DIR) | ||
execute_process(COMMAND "${DPKG_QUERY}" -S "${LLVM_CMAKE_DIR}" COMMAND cut -d: -f1 RESULT_VARIABLE LLVM_PKG_FIND_RESULT OUTPUT_VARIABLE LLVM_PKG_FIND_OUTPUT) | ||
|
@@ -70,6 +70,8 @@ if(DPKG_QUERY AND OS_RELEASE MATCHES "\n?ID=\"?ubuntu" AND LLVM_CMAKE_DIR) | |
string(APPEND CPACK_DEBIAN_DEV_PACKAGE_DEPENDS ", ${LLVM_PKG_FIND_OUTPUT}") | ||
endif() | ||
endif() | ||
set(CPACK_DEBIAN_DEV_PACKAGE_CONTROL_EXTRA ${CMAKE_BINARY_DIR}/scripts/postinst) | ||
set(CPACK_DEBIAN_DEV_PACKAGE_CONTROL_EXTRA ${CMAKE_BINARY_DIR}/scripts/prerm) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This causes only There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Trying: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tested and that worked: |
||
|
||
#since rpm packages aren't component based, make sure description picks up more detailed description instead of just summary | ||
set(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_COMPONENT_BASE_DESCRIPTION}") | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
if [ ! -L ${CMAKE_INSTALL_FULL_LIBDIR}/python3/dist-packages/TestHarness ]; then | ||
mkdir -p ${CMAKE_INSTALL_FULL_LIBDIR}/python3/dist-packages | ||
ln -s ../../../share/leap_testing/tests/TestHarness ${CMAKE_INSTALL_FULL_LIBDIR}/python3/dist-packages/TestHarness | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Per our discussion: So, from what I can tell there are a couple caveats here: It's populated for free after executing But am not sure if finding Python_SITELIB from cmake is a good idea. From our discussion, sounds like the thought is to: Leave it as is for now. Then when dropping support for ubuntu18 and bumping cmake we can tend to it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I concur, finding But we could potentially use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Issue created to investigate this in the future: #839 |
||
fi | ||
|
||
if [ ! -L ${CMAKE_INSTALL_FULL_DATAROOTDIR}/leap_testing/bin ]; then | ||
mkdir -p ${CMAKE_INSTALL_FULL_DATAROOTDIR}/leap_testing | ||
ln -s ../../bin ${CMAKE_INSTALL_FULL_DATAROOTDIR}/leap_testing/bin | ||
ScottBailey marked this conversation as resolved.
Show resolved
Hide resolved
|
||
fi |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
|
||
if [ -L ${CMAKE_INSTALL_FULL_LIBDIR}/python3/dist-packages/TestHarness ]; then | ||
rmdir -p ${CMAKE_INSTALL_FULL_LIBDIR}/python3/dist-packages/TestHarness | ||
fi | ||
|
||
if [ -L ${CMAKE_INSTALL_FULL_DATAROOTDIR}/leap_testing/bin ]; then | ||
rmdir -p ${CMAKE_INSTALL_FULL_DATAROOTDIR}/leap_testing/bin | ||
fi | ||
ScottBailey marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import os | ||
|
||
sys_core_symbol = os.environ.get('CORE_SYMBOL_NAME') | ||
|
||
CORE_SYMBOL=sys_core_symbol if sys_core_symbol else '${CORE_SYMBOL_NAME}' |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for putting the very clear explanation around this