mirror of https://github.com/upx/upx.git
CI updates
This commit is contained in:
parent
52dde5789e
commit
24b4ec42e7
|
@ -114,27 +114,34 @@ endif()
|
|||
if(NOT UPX_CONFIG_DISABLE_EXHAUSTIVE_TESTS)
|
||||
foreach(method IN ITEMS nrv2b nrv2d nrv2e lzma)
|
||||
foreach(level IN ITEMS 1 2 3 4 5 6 7)
|
||||
set(s "${method}-${level}")
|
||||
upx_add_test(upx-self-pack-${s} upx --${method} -${level} --all-filters --debug-use-random-filter "${upx_self_exe}" ${fo} -o upx-packed-${s}${exe})
|
||||
upx_add_test(upx-list-${s} upx -l upx-packed-${s}${exe})
|
||||
upx_add_test(upx-fileinfo-${s} upx --fileinfo upx-packed-${s}${exe})
|
||||
upx_add_test(upx-test-${s} upx -t upx-packed-${s}${exe})
|
||||
upx_add_test(upx-unpack-${s} upx -d upx-packed-${s}${exe} ${fo} -o upx-unpacked-${s}${exe})
|
||||
upx_add_test(upx-compare-${s} "${CMAKE_COMMAND}" -E compare_files upx-unpacked${exe} upx-unpacked-${s}${exe})
|
||||
upx_test_depends(upx-list-${s} upx-self-pack-${s})
|
||||
upx_test_depends(upx-fileinfo-${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-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)
|
||||
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})
|
||||
endif()
|
||||
foreach(small IN ITEMS normal small)
|
||||
set(s "${method}-${level}")
|
||||
set(ss "")
|
||||
if(small MATCHES "small")
|
||||
set(s "${method}-${level}-${small}")
|
||||
set(ss "--small")
|
||||
endif()
|
||||
upx_add_test(upx-self-pack-${s} upx --${method} -${level} ${ss} --all-filters --debug-use-random-filter "${upx_self_exe}" ${fo} -o upx-packed-${s}${exe})
|
||||
upx_add_test(upx-list-${s} upx -l upx-packed-${s}${exe})
|
||||
upx_add_test(upx-fileinfo-${s} upx --fileinfo upx-packed-${s}${exe})
|
||||
upx_add_test(upx-test-${s} upx -t upx-packed-${s}${exe})
|
||||
upx_add_test(upx-unpack-${s} upx -d upx-packed-${s}${exe} ${fo} -o upx-unpacked-${s}${exe})
|
||||
upx_add_test(upx-compare-${s} "${CMAKE_COMMAND}" -E compare_files upx-unpacked${exe} upx-unpacked-${s}${exe})
|
||||
upx_test_depends(upx-list-${s} upx-self-pack-${s})
|
||||
upx_test_depends(upx-fileinfo-${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-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)
|
||||
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})
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
endforeach()
|
||||
endif() # UPX_CONFIG_DISABLE_EXHAUSTIVE_TESTS
|
||||
|
|
|
@ -148,17 +148,24 @@ if [[ $UPX_CONFIG_DISABLE_EXHAUSTIVE_TESTS != ON ]]; then
|
|||
set +x
|
||||
for method in nrv2b nrv2d nrv2e lzma; do
|
||||
for level in 1 2 3 4 5 6 7; do
|
||||
s="${method}-${level}"
|
||||
echo "========== $s =========="
|
||||
"${run_upx[@]}" -qq --${method} -${level} --all-filters --debug-use-random-filter "${upx_self_exe}" ${fo} -o upx-packed-${s}${exe}
|
||||
"${run_upx[@]}" -qq -l upx-packed-${s}${exe}
|
||||
"${run_upx[@]}" -qq --fileinfo upx-packed-${s}${exe}
|
||||
"${run_upx[@]}" -qq -t upx-packed-${s}${exe}
|
||||
"${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
|
||||
"${emu[@]}" ./upx-packed-${s}${exe} --version-short
|
||||
fi
|
||||
for small in normal small; do
|
||||
s="${method}-${level}"
|
||||
ss=
|
||||
if [[ $small == "small" ]]; then
|
||||
s="${method}-${level}-${small}"
|
||||
ss="--small"
|
||||
fi
|
||||
echo "========== $s =========="
|
||||
"${run_upx[@]}" -qq --${method} -${level} ${ss} --all-filters --debug-use-random-filter "${upx_self_exe}" ${fo} -o upx-packed-${s}${exe}
|
||||
"${run_upx[@]}" -qq -l upx-packed-${s}${exe}
|
||||
"${run_upx[@]}" -qq --fileinfo upx-packed-${s}${exe}
|
||||
"${run_upx[@]}" -qq -t upx-packed-${s}${exe}
|
||||
"${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
|
||||
"${emu[@]}" ./upx-packed-${s}${exe} --version-short
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue