all: improve tests

This commit is contained in:
Markus F.X.J. Oberhumer
2024-04-16 15:20:56 +02:00
parent 35c6a200ad
commit 1d2b276425
11 changed files with 249 additions and 216 deletions
+31 -23
View File
@@ -451,36 +451,44 @@ if(NOT UPX_CONFIG_DISABLE_SELF_PACK_TEST)
# use fast compression levels because
# - we want to test UPX and not the compression libraries
# - higher compression levels are somewhat slow in our automated QEMU/Valgrind CI tests
upx_add_serial_test(upx-self-pack upx -3 --all-filters "${upx_self_exe}" ${fo} -o upx-packed${exe})
upx_add_serial_test(upx-self-pack-n2b upx -3 --nrv2b "${upx_self_exe}" ${fo} -o upx-packed-n2b${exe})
upx_add_serial_test(upx-self-pack-n2d upx -3 --nrv2d "${upx_self_exe}" ${fo} -o upx-packed-n2d${exe})
upx_add_serial_test(upx-self-pack-n2e upx -3 --nrv2e "${upx_self_exe}" ${fo} -o upx-packed-n2e${exe})
upx_add_serial_test(upx-self-pack-lzma upx -1 --lzma "${upx_self_exe}" ${fo} -o upx-packed-lzma${exe})
upx_add_serial_test(upx-self-pack upx -3 "${upx_self_exe}" ${fo} -o upx-packed${exe})
upx_add_serial_test(upx-self-pack-fa upx -3 --all-filters "${upx_self_exe}" ${fo} -o upx-packed-fa${exe})
upx_add_serial_test(upx-self-pack-fn upx -3 --no-filter "${upx_self_exe}" ${fo} -o upx-packed-fn${exe})
upx_add_serial_test(upx-self-pack-nrv2b upx -3 --nrv2b "${upx_self_exe}" ${fo} -o upx-packed-nrv2b${exe})
upx_add_serial_test(upx-self-pack-nrv2d upx -3 --nrv2d "${upx_self_exe}" ${fo} -o upx-packed-nrv2d${exe})
upx_add_serial_test(upx-self-pack-nrv2e upx -3 --nrv2e "${upx_self_exe}" ${fo} -o upx-packed-nrv2e${exe})
upx_add_serial_test(upx-self-pack-lzma upx -1 --lzma "${upx_self_exe}" ${fo} -o upx-packed-lzma${exe})
upx_add_serial_test(upx-list upx -l upx-packed${exe} upx-packed-n2b${exe} upx-packed-n2d${exe} upx-packed-n2e${exe} upx-packed-lzma${exe})
upx_add_serial_test(upx-fileinfo upx --fileinfo upx-packed${exe} upx-packed-n2b${exe} upx-packed-n2d${exe} upx-packed-n2e${exe} upx-packed-lzma${exe})
upx_add_serial_test(upx-test upx -t upx-packed${exe} upx-packed-n2b${exe} upx-packed-n2d${exe} upx-packed-n2e${exe} upx-packed-lzma${exe})
upx_add_serial_test(upx-list upx -l upx-packed${exe} upx-packed-fa${exe} upx-packed-fn${exe} upx-packed-nrv2b${exe} upx-packed-nrv2d${exe} upx-packed-nrv2e${exe} upx-packed-lzma${exe})
upx_add_serial_test(upx-fileinfo upx --fileinfo upx-packed${exe} upx-packed-fa${exe} upx-packed-fn${exe} upx-packed-nrv2b${exe} upx-packed-nrv2d${exe} upx-packed-nrv2e${exe} upx-packed-lzma${exe})
upx_add_serial_test(upx-test upx -t upx-packed${exe} upx-packed-fa${exe} upx-packed-fn${exe} upx-packed-nrv2b${exe} upx-packed-nrv2d${exe} upx-packed-nrv2e${exe} upx-packed-lzma${exe})
upx_add_serial_test(upx-unpack upx -d upx-packed${exe} ${fo} -o upx-unpacked${exe})
upx_add_serial_test(upx-unpack-n2b upx -d upx-packed-n2b${exe} ${fo} -o upx-unpacked-n2b${exe})
upx_add_serial_test(upx-unpack-n2d upx -d upx-packed-n2d${exe} ${fo} -o upx-unpacked-n2d${exe})
upx_add_serial_test(upx-unpack-n2e upx -d upx-packed-n2e${exe} ${fo} -o upx-unpacked-n2e${exe})
upx_add_serial_test(upx-unpack-lzma upx -d upx-packed-lzma${exe} ${fo} -o upx-unpacked-lzma${exe})
upx_add_serial_test(upx-unpack upx -d upx-packed${exe} ${fo} -o upx-unpacked${exe})
upx_add_serial_test(upx-unpack-fa upx -d upx-packed-fa${exe} ${fo} -o upx-unpacked-fa${exe})
upx_add_serial_test(upx-unpack-fn upx -d upx-packed-fn${exe} ${fo} -o upx-unpacked-fn${exe})
upx_add_serial_test(upx-unpack-nrv2b upx -d upx-packed-nrv2b${exe} ${fo} -o upx-unpacked-nrv2b${exe})
upx_add_serial_test(upx-unpack-nrv2d upx -d upx-packed-nrv2d${exe} ${fo} -o upx-unpacked-nrv2d${exe})
upx_add_serial_test(upx-unpack-nrv2e upx -d upx-packed-nrv2e${exe} ${fo} -o upx-unpacked-nrv2e${exe})
upx_add_serial_test(upx-unpack-lzma upx -d upx-packed-lzma${exe} ${fo} -o upx-unpacked-lzma${exe})
if(NOT UPX_CONFIG_DISABLE_RUN_UNPACKED_TEST)
upx_add_serial_test(upx-run-unpacked ${emu} ./upx-unpacked${exe} --version-short)
upx_add_serial_test(upx-run-unpacked-n2b ${emu} ./upx-unpacked-n2b${exe} --version-short)
upx_add_serial_test(upx-run-unpacked-n2d ${emu} ./upx-unpacked-n2d${exe} --version-short)
upx_add_serial_test(upx-run-unpacked-n2e ${emu} ./upx-unpacked-n2e${exe} --version-short)
upx_add_serial_test(upx-run-unpacked-lzma ${emu} ./upx-unpacked-lzma${exe} --version-short)
upx_add_serial_test(upx-run-unpacked ${emu} ./upx-unpacked${exe} --version-short)
upx_add_serial_test(upx-run-unpacked-fa ${emu} ./upx-unpacked-fa${exe} --version-short)
upx_add_serial_test(upx-run-unpacked-fn ${emu} ./upx-unpacked-fn${exe} --version-short)
upx_add_serial_test(upx-run-unpacked-nrv2b ${emu} ./upx-unpacked-nrv2b${exe} --version-short)
upx_add_serial_test(upx-run-unpacked-nrv2d ${emu} ./upx-unpacked-nrv2d${exe} --version-short)
upx_add_serial_test(upx-run-unpacked-nrv2e ${emu} ./upx-unpacked-nrv2e${exe} --version-short)
upx_add_serial_test(upx-run-unpacked-lzma ${emu} ./upx-unpacked-lzma${exe} --version-short)
endif()
if(NOT UPX_CONFIG_DISABLE_RUN_PACKED_TEST)
upx_add_serial_test(upx-run-packed ${emu} ./upx-packed${exe} --version-short)
upx_add_serial_test(upx-run-packed-n2b ${emu} ./upx-packed-n2b${exe} --version-short)
upx_add_serial_test(upx-run-packed-n2d ${emu} ./upx-packed-n2d${exe} --version-short)
upx_add_serial_test(upx-run-packed-n2e ${emu} ./upx-packed-n2e${exe} --version-short)
upx_add_serial_test(upx-run-packed-lzma ${emu} ./upx-packed-lzma${exe} --version-short)
upx_add_serial_test(upx-run-packed ${emu} ./upx-packed${exe} --version-short)
upx_add_serial_test(upx-run-packed-fa ${emu} ./upx-packed-fa${exe} --version-short)
upx_add_serial_test(upx-run-packed-fn ${emu} ./upx-packed-fn${exe} --version-short)
upx_add_serial_test(upx-run-packed-nrv2b ${emu} ./upx-packed-nrv2b${exe} --version-short)
upx_add_serial_test(upx-run-packed-nrv2d ${emu} ./upx-packed-nrv2d${exe} --version-short)
upx_add_serial_test(upx-run-packed-nrv2e ${emu} ./upx-packed-nrv2e${exe} --version-short)
upx_add_serial_test(upx-run-packed-lzma ${emu} ./upx-packed-lzma${exe} --version-short)
endif()
endif() # UPX_CONFIG_DISABLE_SELF_PACK_TEST
endif() # CMAKE_CROSSCOMPILING