Update Travis and AppVeyor.
This commit is contained in:
@@ -5,13 +5,30 @@ set -e; set -o pipefail
|
||||
# Support for Travis CI -- https://travis-ci.org/upx/upx/builds
|
||||
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
|
||||
|
||||
source ./.github/travis_init.sh || exit 1
|
||||
|
||||
|
||||
#
|
||||
# very first version of the upx-testsuite
|
||||
#
|
||||
|
||||
if [[ $TRAVIS_OS_NAME == osx ]]; then
|
||||
argv0="$0"; argv0dir=$(greadlink -en -- "$0"); argv0dir=$(dirname "$argv0dir")
|
||||
else
|
||||
argv0="$0"; argv0dir=$(readlink -en -- "$0"); argv0dir=$(dirname "$argv0dir")
|
||||
fi
|
||||
source "$argv0dir/travis_init.sh" || exit 1
|
||||
|
||||
# BM_T is TESTSUITE_FLAGS
|
||||
if [[ $BM_T =~ (^|\+)SKIP($|\+) ]]; then
|
||||
echo "UPX testsuite SKIPPED."
|
||||
exit 0
|
||||
fi
|
||||
[[ -f $upx_exe ]] && upx_exe=$(readlink -en -- "$upx_exe")
|
||||
|
||||
# create dirs
|
||||
cd / || exit 1
|
||||
mkbuilddirs $upx_testsuite_BUILDDIR
|
||||
cd / && cd $upx_testsuite_BUILDDIR || exit 1
|
||||
if [[ ! -d $upx_testsuite_SRCDIR/files/packed ]]; then exit 1; fi
|
||||
|
||||
|
||||
# /***********************************************************************
|
||||
# // support functions
|
||||
@@ -33,7 +50,7 @@ testsuite_split_f() {
|
||||
}
|
||||
|
||||
testsuite_check_sha() {
|
||||
(cd "$1" && $sha256sum -b */* | LC_ALL=C sort -k2) > $1/.sha256sums.current
|
||||
(cd "$1" && sha256sum -b */* | LC_ALL=C sort -k2) > $1/.sha256sums.current
|
||||
echo
|
||||
cat $1/.sha256sums.current
|
||||
if ! cmp -s $1/.sha256sums.expected $1/.sha256sums.current; then
|
||||
@@ -46,19 +63,19 @@ testsuite_check_sha() {
|
||||
}
|
||||
|
||||
testsuite_run_compress() {
|
||||
testsuite_header $t
|
||||
testsuite_header $testdir
|
||||
local f ff
|
||||
for f in $upx_testsuite_SRCDIR/files/packed/*/upx-3.91*; do
|
||||
testsuite_split_f $f
|
||||
[[ -z $fb ]] && continue
|
||||
mkdir -p $t/$fsubdir
|
||||
mkdir -p $testdir/$fsubdir
|
||||
ff=t01_decompressed/$fsubdir/$fb
|
||||
$upx_exe --prefer-ucl "$@" $ff -o $t/$fsubdir/$fb
|
||||
$upx_exe --prefer-ucl "$@" $ff -o $testdir/$fsubdir/$fb
|
||||
done
|
||||
testsuite_check_sha $t
|
||||
$upx_exe -l $t/*/*
|
||||
$upx_exe --file-info $t/*/*
|
||||
$upx_exe -t $t/*/*
|
||||
testsuite_check_sha $testdir
|
||||
$upx_exe -l $testdir/*/*
|
||||
$upx_exe --file-info $testdir/*/*
|
||||
$upx_exe -t $testdir/*/*
|
||||
}
|
||||
|
||||
# /***********************************************************************
|
||||
@@ -68,34 +85,33 @@ testsuite_run_compress() {
|
||||
#set -x
|
||||
exit_code=0
|
||||
|
||||
if [[ $ALLOW_FAIL == 1 ]]; then
|
||||
echo "ALLOW_FAIL=$ALLOW_FAIL"
|
||||
if [[ $BM_T =~ (^|\+)ALLOW_FAIL($|\+) ]]; then
|
||||
echo "ALLOW_FAIL"
|
||||
set +e
|
||||
fi
|
||||
|
||||
if [[ ! -d $upx_testsuite_SRCDIR/files/packed ]]; then exit 1; fi
|
||||
|
||||
[[ -z $upx_exe && -f $upx_BUILDDIR/upx.out ]] && upx_exe=$upx_BUILDDIR/upx.out
|
||||
[[ -z $upx_exe && -f $upx_BUILDDIR/upx.exe ]] && upx_exe=$upx_BUILDDIR/upx.exe
|
||||
if [[ -z $upx_exe ]]; then exit 1; fi
|
||||
if [[ $BM_T =~ (^|\+)qemu($|\+) && -n $upx_qemu ]]; then
|
||||
upx_exe="$upx_qemu $upx_qemu_flags -- $upx_exe"
|
||||
fi
|
||||
if [[ $BM_T =~ (^|\+)wine($|\+) && -n $upx_wine ]]; then
|
||||
upx_exe="$upx_wine $upx_wine_flags $upx_exe"
|
||||
fi
|
||||
if ! $upx_exe --version >/dev/null; then exit 1; fi
|
||||
|
||||
sha256sum=sha256sum
|
||||
if [[ $TRAVIS_OS_NAME == osx ]]; then
|
||||
sha256sum=gsha256sum # brew install coreutils
|
||||
fi
|
||||
if [[ $B =~ (^|\+)valgrind($|\+) ]]; then
|
||||
if [[ $BM_T =~ (^|\+)valgrind($|\+) ]]; then
|
||||
valgrind_flags="--leak-check=full --show-reachable=yes"
|
||||
valgrind_flags="-q --leak-check=no --error-exitcode=1"
|
||||
valgrind_flags="--leak-check=no --error-exitcode=1"
|
||||
upx_exe="valgrind $valgrind_flags $upx_exe"
|
||||
fi
|
||||
|
||||
if [[ $B =~ (^|\+)coverage($|\+) ]]; then
|
||||
lcov -d $upx_BUILDDIR --zerocounters
|
||||
if [[ $BM_B =~ (^|\+)coverage($|\+) ]]; then
|
||||
(cd / && cd $upx_BUILDDIR && lcov -d . --zerocounters)
|
||||
fi
|
||||
|
||||
cd $upx_testsuite_BUILDDIR || exit 1
|
||||
rm -rf ./testsuite_1
|
||||
mkdir testsuite_1
|
||||
cd testsuite_1
|
||||
@@ -108,8 +124,8 @@ export UPX="--no-color --no-progress"
|
||||
# // decompression tests
|
||||
# ************************************************************************/
|
||||
|
||||
t=t01_decompressed
|
||||
mkdir $t; echo -n "\
|
||||
testdir=t01_decompressed
|
||||
mkdir $testdir; echo -n "\
|
||||
24158f78c34c4ef94bb7773a6dda7231d289be76c2f5f60e8b9ddb3f800c100e *amd64-linux.elf/upx-3.91
|
||||
28d7ca8f0dfca8159e637eaf2057230b6e6719e07751aca1d19a45b5efed817c *arm-wince.pe/upx-3.91.exe
|
||||
b1c1c38d50007616aaf8e942839648c80a6111023e0b411e5fa7a06c543aeb4a *armeb-linux.elf/upx-3.91
|
||||
@@ -119,24 +135,24 @@ bcac77a287289301a45fde9a75e4e6c9ad7f8d57856bae6eafaae12ae4445a34 *i386-dos32.djg
|
||||
8e5333ea040f5594d3e67d5b09e005d52b3a52ef55099a7c11d7e39ead38e66d *m68k-atari.tos/upx-3.91.ttp
|
||||
c3f44b4d00a87384c03a6f9e7aec809c1addfe3e271244d38a474f296603088c *mipsel-linux.elf/upx-3.91
|
||||
b8c35fa2956da17ca505956e9f5017bb5f3a746322647e24ccb8ff28059cafa4 *powerpc-linux.elf/upx-3.91
|
||||
" > $t/.sha256sums.expected
|
||||
" > $testdir/.sha256sums.expected
|
||||
|
||||
testsuite_header $t
|
||||
testsuite_header $testdir
|
||||
for f in $upx_testsuite_SRCDIR/files/packed/*/upx-3.91*; do
|
||||
testsuite_split_f $f
|
||||
[[ -z $fb ]] && continue
|
||||
mkdir -p $t/$fsubdir
|
||||
$upx_exe -d $f -o $t/$fsubdir/$fb
|
||||
mkdir -p $testdir/$fsubdir
|
||||
$upx_exe -d $f -o $testdir/$fsubdir/$fb
|
||||
done
|
||||
testsuite_check_sha $t
|
||||
testsuite_check_sha $testdir
|
||||
|
||||
|
||||
# /***********************************************************************
|
||||
# // compression tests
|
||||
# ************************************************************************/
|
||||
|
||||
t=t02_compress_ucl_3_no_filter
|
||||
mkdir $t; echo -n "\
|
||||
testdir=t02_compress_ucl_3_no_filter
|
||||
mkdir $testdir; echo -n "\
|
||||
3dd2564078aa15d35fbf70928cdb094697c4ef8909bd711c7a3bd79eb18ab400 *amd64-linux.elf/upx-3.91
|
||||
16c0493d4d89e6c581748826afd26d2b4caeeae6074b0bdcf55747a4bc9777a5 *arm-wince.pe/upx-3.91.exe
|
||||
ea42d52676d2698f29587e98a9e1536b96ebf523a7d8bc926f6c241a159b4116 *armeb-linux.elf/upx-3.91
|
||||
@@ -146,11 +162,11 @@ a94d5ff62c061d60d64e838ea4bb7610a75cf26a0761b26f9da0efbd38e87ebe *i386-win32.pe/
|
||||
510e2cd126bb8129b9076eb61e1ad3308d9af109cd42dff7252bf43e1e3552ea *m68k-atari.tos/upx-3.91.ttp
|
||||
b61aa58e493b3961646e5c0bcb7f19f74b439fe8f5c934db25b00f97f51a05d0 *mipsel-linux.elf/upx-3.91
|
||||
21071b7dfa542a7e3d6c6a3586b4b844d28270a2beccdc5d03f608a2e71b787d *powerpc-linux.elf/upx-3.91
|
||||
" > $t/.sha256sums.expected
|
||||
" > $testdir/.sha256sums.expected
|
||||
time testsuite_run_compress -3 --no-filter
|
||||
|
||||
t=t03_compress_lzma_1_no_filter
|
||||
mkdir $t; echo -n "\
|
||||
testdir=t03_compress_lzma_1_no_filter
|
||||
mkdir $testdir; echo -n "\
|
||||
542124e236f4dc3ba92de02a07f29df3d8a015bb9f3a5a9681c978746b16e0df *amd64-linux.elf/upx-3.91
|
||||
99ad77f2280a5b4791ead800c7d4d5b29aa49ce40319616f682c1b29ddf20702 *arm-wince.pe/upx-3.91.exe
|
||||
07ca9736f1cd478bde2c8da95a6ecb95bd865dcf8ea48a396b13050ac40d196e *armeb-linux.elf/upx-3.91
|
||||
@@ -160,11 +176,11 @@ e249633d550abe84953a15668e3d74660fd63e9e935bec8564d9df08116b015d *i386-win32.pe/
|
||||
dd561ff9c530711be0934db352cf40f606066c280e27b26e7f8fd6dd1a087e6a *m68k-atari.tos/upx-3.91.ttp
|
||||
813536a8f1b8b8852ed52c560afce8b51612876ac5a3a9e51434d8677932ef7b *mipsel-linux.elf/upx-3.91
|
||||
5a3607a37534bab2a22c2e1dc3f1aa26144c2b75c261f092a3d9116d884edc1a *powerpc-linux.elf/upx-3.91
|
||||
" > $t/.sha256sums.expected
|
||||
" > $testdir/.sha256sums.expected
|
||||
time testsuite_run_compress -1 --lzma --no-filter
|
||||
|
||||
t=t04_compress_ucl_2_all_filters
|
||||
mkdir $t; echo -n "\
|
||||
testdir=t04_compress_ucl_2_all_filters
|
||||
mkdir $testdir; echo -n "\
|
||||
bde869b9b0e29c7930591b3582ef3e864db7757d774082d772df8f6b874e6fd6 *amd64-linux.elf/upx-3.91
|
||||
247e385b1bf2559982cfedde0dc6dafc3fe99ad09100afc8b6ec3e59722afd4f *arm-wince.pe/upx-3.91.exe
|
||||
db894f24777334abb9bf8e34661d057e25c2889b46290cf83db7310c4cdd86fa *armeb-linux.elf/upx-3.91
|
||||
@@ -174,11 +190,11 @@ db894f24777334abb9bf8e34661d057e25c2889b46290cf83db7310c4cdd86fa *armeb-linux.el
|
||||
7b09fa5b2f8d85673f3a52c3b478a8dd129ed23681de4028625b33f5f6890942 *m68k-atari.tos/upx-3.91.ttp
|
||||
707b7f32b8b0c1a4e5c26e370b93ae6eb60ab78f7d6163b4e853eb94e69f5d14 *mipsel-linux.elf/upx-3.91
|
||||
3951a8dbe60f41f7ae1d71ca8d0f022675a04542786351c09281dfce41fd49e0 *powerpc-linux.elf/upx-3.91
|
||||
" > $t/.sha256sums.expected
|
||||
" > $testdir/.sha256sums.expected
|
||||
time testsuite_run_compress -2 --all-filters
|
||||
|
||||
t=t05_compress_all_methods_1_no_filter
|
||||
mkdir $t; echo -n "\
|
||||
testdir=t05_compress_all_methods_1_no_filter
|
||||
mkdir $testdir; echo -n "\
|
||||
542124e236f4dc3ba92de02a07f29df3d8a015bb9f3a5a9681c978746b16e0df *amd64-linux.elf/upx-3.91
|
||||
99ad77f2280a5b4791ead800c7d4d5b29aa49ce40319616f682c1b29ddf20702 *arm-wince.pe/upx-3.91.exe
|
||||
07ca9736f1cd478bde2c8da95a6ecb95bd865dcf8ea48a396b13050ac40d196e *armeb-linux.elf/upx-3.91
|
||||
@@ -188,11 +204,11 @@ e249633d550abe84953a15668e3d74660fd63e9e935bec8564d9df08116b015d *i386-win32.pe/
|
||||
dd561ff9c530711be0934db352cf40f606066c280e27b26e7f8fd6dd1a087e6a *m68k-atari.tos/upx-3.91.ttp
|
||||
813536a8f1b8b8852ed52c560afce8b51612876ac5a3a9e51434d8677932ef7b *mipsel-linux.elf/upx-3.91
|
||||
5a3607a37534bab2a22c2e1dc3f1aa26144c2b75c261f092a3d9116d884edc1a *powerpc-linux.elf/upx-3.91
|
||||
" > $t/.sha256sums.expected
|
||||
" > $testdir/.sha256sums.expected
|
||||
time testsuite_run_compress -1 --all-methods --no-filter
|
||||
|
||||
t=t06_compress_all_methods_no_lzma_no_filter
|
||||
mkdir $t; echo -n "\
|
||||
testdir=t06_compress_all_methods_no_lzma_no_filter
|
||||
mkdir $testdir; echo -n "\
|
||||
6e669ac40043287516be85ddce6e4ac9d41d4e550ea080e23f9dfde7fff8fd64 *amd64-linux.elf/upx-3.91
|
||||
63be06791e4caa5ea530bd58d0fe5af7830fe6907cebb4de6eec5a73ff57bf58 *arm-wince.pe/upx-3.91.exe
|
||||
b95b5a9a1ba4577df41c135b0061a7282e633f006ce6a5c729d73a708f80c0f0 *armeb-linux.elf/upx-3.91
|
||||
@@ -202,7 +218,7 @@ a647ed1aea16f58b544228279ad7159cd3ec5c3533efef1fd2df5a5a59b5d663 *i386-win32.pe/
|
||||
4ce409cc6c1a0e26b0d5e361cd6ef7b0198830a3244235eff3edb18099d1ad22 *m68k-atari.tos/upx-3.91.ttp
|
||||
8b2b9f13dd613b62d9028d2c773a2633bb756a084e5620b3496449ffe1c2dc9e *mipsel-linux.elf/upx-3.91
|
||||
84e82cfffa594230ee44aa06937ccb088778c05d5d67985a314764385018f59d *powerpc-linux.elf/upx-3.91
|
||||
" > $t/.sha256sums.expected
|
||||
" > $testdir/.sha256sums.expected
|
||||
time testsuite_run_compress --all-methods --no-lzma --no-filter
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user