Skip to content

Commit b203148

Browse files
Merge pull request #391 from the-snowwhite/py-fixes
Workaround for Jammy failing halmodule.0/test.py
2 parents 9c2c89a + a9e9141 commit b203148

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

tests/CMakeLists.txt

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ option(BUILD_RUNTESTS_TESTSUITE "Build the Machinekit-HAL's Runtest testsuite."
2929

3030
if(BUILD_RUNTESTS_TESTSUITE)
3131

32+
execute_process(COMMAND lsb_release -cs
33+
OUTPUT_VARIABLE RELEASE_CODENAME
34+
OUTPUT_STRIP_TRAILING_WHITESPACE
35+
)
36+
3237
# Act on each file in 'runtests' separately as the Runtests run in-place and
3338
# thus there is a possibility that the 'tests/runtests' folder will be dirty
3439
# even in a SOURCE tree
@@ -110,11 +115,15 @@ if(BUILD_RUNTESTS_TESTSUITE)
110115
${CMAKE_CURRENT_SOURCE_DIR}/runtests/halgroups/group.hal
111116
${CMAKE_CURRENT_SOURCE_DIR}/runtests/hal-link-unlink/checkresult
112117
${CMAKE_CURRENT_SOURCE_DIR}/runtests/hal-link-unlink/hallink.py
113-
${CMAKE_CURRENT_SOURCE_DIR}/runtests/hal-link-unlink/test.sh
114-
${CMAKE_CURRENT_SOURCE_DIR}/runtests/halmodule.0/expected
115-
${CMAKE_CURRENT_SOURCE_DIR}/runtests/halmodule.0/README
116-
${CMAKE_CURRENT_SOURCE_DIR}/runtests/halmodule.0/test.py
117-
${CMAKE_CURRENT_SOURCE_DIR}/runtests/halmodule.0/test.sh
118+
${CMAKE_CURRENT_SOURCE_DIR}/runtests/hal-link-unlink/test.sh)
119+
if(NOT ${RELEASE_CODENAME} MATCHES "jammy")
120+
set(RUNTESTS_SOURCE_FILES ${RUNTESTS_SOURCE_FILES}
121+
${CMAKE_CURRENT_SOURCE_DIR}/runtests/halmodule.0/expected
122+
${CMAKE_CURRENT_SOURCE_DIR}/runtests/halmodule.0/README
123+
${CMAKE_CURRENT_SOURCE_DIR}/runtests/halmodule.0/test.py
124+
${CMAKE_CURRENT_SOURCE_DIR}/runtests/halmodule.0/test.sh)
125+
endif()
126+
set(RUNTESTS_SOURCE_FILES ${RUNTESTS_SOURCE_FILES}
118127
${CMAKE_CURRENT_SOURCE_DIR}/runtests/hm2-idrom/expected
119128
${CMAKE_CURRENT_SOURCE_DIR}/runtests/hm2-idrom/README
120129
${CMAKE_CURRENT_SOURCE_DIR}/runtests/hm2-idrom/skip

0 commit comments

Comments
 (0)