From 852666010e0e4cb657d0da57f9adc0fb35c42806 Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Tue, 29 Jul 2025 19:50:17 +0200 Subject: [PATCH] CI updates --- CMakeLists.txt | 3 ++- misc/cmake/self_pack_test.cmake | 14 +++++++------- misc/testsuite/mimic_ctest.sh | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b90936c..21dc5624 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/misc/cmake/self_pack_test.cmake b/misc/cmake/self_pack_test.cmake index 0d7e45e9..86829acf 100644 --- a/misc/cmake/self_pack_test.cmake +++ b/misc/cmake/self_pack_test.cmake @@ -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: diff --git a/misc/testsuite/mimic_ctest.sh b/misc/testsuite/mimic_ctest.sh index 1da6db2b..8cdacd94 100755 --- a/misc/testsuite/mimic_ctest.sh +++ b/misc/testsuite/mimic_ctest.sh @@ -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