1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00

CI updates

This commit is contained in:
Markus F.X.J. Oberhumer 2025-07-29 19:50:17 +02:00
parent bbb886ae4d
commit 852666010e
3 changed files with 10 additions and 9 deletions

View File

@ -31,7 +31,7 @@ endif()
include("${CMAKE_CURRENT_SOURCE_DIR}/misc/cmake/functions.cmake")
upx_print_var(CMAKE_VERSION UPX_CONFIG_CMAKE_MINIMUM_REQUIRED_VERSION CMAKE_GENERATOR)
upx_print_var(CMAKE_GENERATOR_TOOLSET CMAKE_GENERATOR_PLATFORM)
upx_print_env_var(CC CXX)
upx_print_env_var(CC CXX CPPFLAGS CFLAGS CXXFLAGS)
#***********************************************************************
# options
@ -469,6 +469,7 @@ if(NOT CMAKE_CROSSCOMPILING OR CMAKE_CROSSCOMPILING_EMULATOR)
# IMPORTANT NOTE: these tests can only work if the host executable format
# is supported by UPX!
include("${CMAKE_CURRENT_SOURCE_DIR}/misc/cmake/self_pack_test.cmake")
upx_self_pack_test()
endif()
endif()

View File

@ -10,6 +10,8 @@
# is supported by UPX!
#***********************************************************************
function(upx_self_pack_test)
set(emu "")
if(DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
set(emu "${CMAKE_CROSSCOMPILING_EMULATOR}")
@ -138,20 +140,18 @@ if(NOT UPX_CONFIG_DISABLE_EXHAUSTIVE_TESTS)
set_tests_properties(upx-self-pack-${s} PROPERTIES COST "2${level}")
endif()
if(NOT UPX_CONFIG_DISABLE_RUN_PACKED_TEST)
foreach(i IN ITEMS 1 2 3 4 5 6 7 8 9)
set(i 0)
while(${i} LESS 20)
math(EXPR i "${i} + 1")
upx_add_test(upx-run-packed-${s}-${i} ${emu} ./upx-packed-${s}${exe} --version-short)
upx_test_depends(upx-run-packed-${s}-${i} upx-self-pack-${s})
endforeach()
endwhile()
endif()
endforeach()
endforeach()
endforeach()
endif() # UPX_CONFIG_DISABLE_EXHAUSTIVE_TESTS
# clean up
set(emu "")
set(exe "")
set(upx_self_exe "")
set(fo "")
endfunction()
# vim:set ft=cmake ts=4 sw=4 tw=0 et:

View File

@ -169,7 +169,7 @@ if [[ $UPX_CONFIG_DISABLE_EXHAUSTIVE_TESTS != ON ]]; then
"${run_upx[@]}" -qq -d upx-packed-${s}${exe} ${fo} -o upx-unpacked-${s}${exe}
cmp -s upx-unpacked${exe} upx-unpacked-${s}${exe}
if [[ $UPX_CONFIG_DISABLE_RUN_PACKED_TEST != ON ]]; then
: ${upx_run_packed_test_count:=9}
: ${upx_run_packed_test_count:=20}
for ((i = 0; i < $upx_run_packed_test_count; i++)); do
"${emu[@]}" ./upx-packed-${s}${exe} --version-short
done