mirror of https://github.com/upx/upx.git
CI updates
This commit is contained in:
parent
3c0ca81311
commit
b0dc483165
|
@ -239,7 +239,7 @@ endfunction()
|
||||||
|
|
||||||
function(upx_internal_add_definitions_with_prefix) # ARGV; needs include(CheckCCompilerFlag)
|
function(upx_internal_add_definitions_with_prefix) # ARGV; needs include(CheckCCompilerFlag)
|
||||||
set(flag_prefix "${ARGV0}")
|
set(flag_prefix "${ARGV0}")
|
||||||
if(flag_prefix MATCHES "^empty$") # need "empty" to work around bug in old CMake versions
|
if("${flag_prefix}" MATCHES "^empty$") # need "empty" to work around bug in old CMake versions
|
||||||
set(flag_prefix "")
|
set(flag_prefix "")
|
||||||
endif()
|
endif()
|
||||||
list(REMOVE_AT ARGV 0)
|
list(REMOVE_AT ARGV 0)
|
||||||
|
@ -320,7 +320,7 @@ function(upx_compile_source_debug_with_O2) # ARGV
|
||||||
# MSVC uses some Debug compilation options like -RTC1 that are incompatible with -O2
|
# MSVC uses some Debug compilation options like -RTC1 that are incompatible with -O2
|
||||||
else()
|
else()
|
||||||
get_source_file_property(prop "${source}" COMPILE_FLAGS)
|
get_source_file_property(prop "${source}" COMPILE_FLAGS)
|
||||||
if(prop MATCHES "^(NOTFOUND)?$")
|
if("${prop}" MATCHES "^(NOTFOUND)?$")
|
||||||
set_source_files_properties("${source}" PROPERTIES COMPILE_FLAGS "${flags}")
|
set_source_files_properties("${source}" PROPERTIES COMPILE_FLAGS "${flags}")
|
||||||
else()
|
else()
|
||||||
set_source_files_properties("${source}" PROPERTIES COMPILE_FLAGS "${prop} ${flags}")
|
set_source_files_properties("${source}" PROPERTIES COMPILE_FLAGS "${prop} ${flags}")
|
||||||
|
@ -372,7 +372,7 @@ function(upx_test_depends) # ARGV
|
||||||
set(name "${ARGV0}")
|
set(name "${ARGV0}")
|
||||||
list(REMOVE_AT ARGV 0)
|
list(REMOVE_AT ARGV 0)
|
||||||
get_property(prop TEST "${name}" PROPERTY DEPENDS)
|
get_property(prop TEST "${name}" PROPERTY DEPENDS)
|
||||||
if(prop MATCHES "^(NOTFOUND)?$")
|
if("${prop}" MATCHES "^(NOTFOUND)?$")
|
||||||
set_tests_properties("${name}" PROPERTIES DEPENDS "${ARGV}")
|
set_tests_properties("${name}" PROPERTIES DEPENDS "${ARGV}")
|
||||||
else()
|
else()
|
||||||
set_tests_properties("${name}" PROPERTIES DEPENDS "${prop};${ARGV}")
|
set_tests_properties("${name}" PROPERTIES DEPENDS "${prop};${ARGV}")
|
||||||
|
|
|
@ -72,6 +72,16 @@ upx_test_depends(upx-compare-nrv2b "upx-unpack;upx-unpack-nrv2b")
|
||||||
upx_test_depends(upx-compare-nrv2d "upx-unpack;upx-unpack-nrv2d")
|
upx_test_depends(upx-compare-nrv2d "upx-unpack;upx-unpack-nrv2d")
|
||||||
upx_test_depends(upx-compare-nrv2e "upx-unpack;upx-unpack-nrv2e")
|
upx_test_depends(upx-compare-nrv2e "upx-unpack;upx-unpack-nrv2e")
|
||||||
upx_test_depends(upx-compare-lzma "upx-unpack;upx-unpack-lzma")
|
upx_test_depends(upx-compare-lzma "upx-unpack;upx-unpack-lzma")
|
||||||
|
# tests with higher COST values will run first
|
||||||
|
set_tests_properties(upx-self-pack PROPERTIES COST 90)
|
||||||
|
set_tests_properties(upx-self-pack-fa PROPERTIES COST 20)
|
||||||
|
set_tests_properties(upx-self-pack-fn PROPERTIES COST 20)
|
||||||
|
set_tests_properties(upx-self-pack-fr PROPERTIES COST 20)
|
||||||
|
set_tests_properties(upx-self-pack-nrv2b PROPERTIES COST 20)
|
||||||
|
set_tests_properties(upx-self-pack-nrv2d PROPERTIES COST 20)
|
||||||
|
set_tests_properties(upx-self-pack-nrv2e PROPERTIES COST 20)
|
||||||
|
set_tests_properties(upx-self-pack-lzma PROPERTIES COST 30)
|
||||||
|
set_tests_properties(upx-unpack PROPERTIES COST 10)
|
||||||
|
|
||||||
if(NOT UPX_CONFIG_DISABLE_RUN_UNPACKED_TEST)
|
if(NOT UPX_CONFIG_DISABLE_RUN_UNPACKED_TEST)
|
||||||
upx_add_test(upx-run-unpacked ${emu} ./upx-unpacked${exe} --version-short)
|
upx_add_test(upx-run-unpacked ${emu} ./upx-unpacked${exe} --version-short)
|
||||||
|
@ -116,6 +126,11 @@ if(NOT UPX_CONFIG_DISABLE_EXHAUSTIVE_TESTS)
|
||||||
upx_test_depends(upx-test-${s} upx-self-pack-${s})
|
upx_test_depends(upx-test-${s} upx-self-pack-${s})
|
||||||
upx_test_depends(upx-unpack-${s} upx-self-pack-${s})
|
upx_test_depends(upx-unpack-${s} upx-self-pack-${s})
|
||||||
upx_test_depends(upx-compare-${s} "upx-unpack;upx-unpack-${s}")
|
upx_test_depends(upx-compare-${s} "upx-unpack;upx-unpack-${s}")
|
||||||
|
if(method MATCHES "lzma")
|
||||||
|
set_tests_properties(upx-self-pack-${s} PROPERTIES COST "3${level}")
|
||||||
|
else()
|
||||||
|
set_tests_properties(upx-self-pack-${s} PROPERTIES COST "2${level}")
|
||||||
|
endif()
|
||||||
if(NOT UPX_CONFIG_DISABLE_RUN_PACKED_TEST)
|
if(NOT UPX_CONFIG_DISABLE_RUN_PACKED_TEST)
|
||||||
upx_add_test(upx-run-packed-${s} ${emu} ./upx-packed-${s}${exe} --version-short)
|
upx_add_test(upx-run-packed-${s} ${emu} ./upx-packed-${s}${exe} --version-short)
|
||||||
upx_test_depends(upx-run-packed-${s} upx-self-pack-${s})
|
upx_test_depends(upx-run-packed-${s} upx-self-pack-${s})
|
||||||
|
|
Loading…
Reference in New Issue