Update Travis and AppVeyor.

This commit is contained in:
Markus F.X.J. Oberhumer
2016-09-29 01:55:52 +02:00
parent 81f3ff098f
commit 807ab8d19f
3 changed files with 43 additions and 22 deletions
+9 -2
View File
@@ -6,9 +6,13 @@
#set -x # debug
umask 022
# just in case
UPX=
# set CC and CXX from C
CC=false CXX=false SCAN_BUILD=false
[[ -z $C ]] && C=gcc
if [[ -z $CC_OVERRIDE ]]; then
CC=false CXX=false SCAN_BUILD=false
case $C in
clang | clang-m?? | clang-3.4-m?? | clang-[678][0-9][0-9]-m??)
CC="clang"; CXX="clang++" ;; # standard system compiler
@@ -32,6 +36,7 @@ case $C in
clang* | gcc*) CC="$CC -std=gnu89" ;;
esac
export CC CXX
fi # CC_OVERRIDE
# B is BUILD_TYPE
[[ -z $B ]] && B=release
@@ -50,7 +55,7 @@ upx_testsuite_BUILDDIR="$tmake_top_bdir/upx-testsuite"
lcov_OUTPUTDIR="$tmake_top_bdir/.lcov-results"
mkdir -p -v $upx_BUILDDIR $ucl_BUILDDIR $upx_testsuite_BUILDDIR
[[ -d $tmake_top_bdir/.mfxnobackup ]] || echo "timestamp" > $tmake_top_bdir/.mfxnobackup
[[ -d $tmake_top_bdir/.mfxnobackup ]] && echo "timestamp" > $tmake_top_bdir/.mfxnobackup
export UPX_UCLDIR="$ucl_SRCDIR"
@@ -63,7 +68,9 @@ cd / && cd $upx_BUILDDIR || exit 1
# enter srcdir
cd / && cd $upx_SRCDIR || exit 1
if [[ -n $APPVEYOR_JOB_ID ]]; then
# for some reason this is needed for bash on AppVeyor
sort() {
/usr/bin/sort "$@"
}
fi
+14 -12
View File
@@ -18,7 +18,7 @@ source ./.github/travis_init.sh || exit 1
# ************************************************************************/
testsuite_header() {
local x="========"; x="$x$x$x$x$x$x$x$x$x"
local x="==========="; x="$x$x$x$x$x$x$x"
echo -e "\n${x}\n${1}\n${x}\n"
}
@@ -34,26 +34,28 @@ testsuite_split_f() {
testsuite_check_sha() {
(cd "$1" && $sha256sum -b */* | LC_ALL=C sort -k2) > $1/.sha256sums.current
echo
cat $1/.sha256sums.current
if ! cmp -s $1/.sha256sums.current $1/.sha256sums.expected; then
if ! cmp -s $1/.sha256sums.expected $1/.sha256sums.current; then
echo "UPX-ERROR: checksum mismatch"
diff -u $1/.sha256sums.current $1/.sha256sums.expected || true
diff -u $1/.sha256sums.expected $1/.sha256sums.current || true
#exit 1
exit_code=1
fi
echo
}
testsuite_run_compress() {
testsuite_header "$t"
testsuite_header $t
local f ff
for f in $upx_testsuite_SRCDIR/files/packed/*/upx-3.91*; do
testsuite_split_f "$f"
testsuite_split_f $f
[[ -z $fb ]] && continue
mkdir -p $t/$fsubdir
ff=t01_decompressed/$fsubdir/$fb
$upx_exe --prefer-ucl "$@" $ff -o $t/$fsubdir/$fb
done
testsuite_check_sha "$t"
testsuite_check_sha $t
$upx_exe -l $t/*/*
$upx_exe --file-info $t/*/*
$upx_exe -t $t/*/*
@@ -75,8 +77,8 @@ 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 [[ ! -f $upx_exe ]]; then exit 1; fi
if [[ ! -x $upx_exe ]]; then exit 1; fi
if [[ -z $upx_exe ]]; then exit 1; fi
if ! $upx_exe --version >/dev/null; then exit 1; fi
sha256sum=sha256sum
if [[ $TRAVIS_OS_NAME == osx ]]; then
@@ -99,7 +101,7 @@ mkdir testsuite_1
cd testsuite_1
export UPX=
export UPX="--no-progress"
export UPX="--no-color --no-progress"
# /***********************************************************************
@@ -119,14 +121,14 @@ c3f44b4d00a87384c03a6f9e7aec809c1addfe3e271244d38a474f296603088c *mipsel-linux.e
b8c35fa2956da17ca505956e9f5017bb5f3a746322647e24ccb8ff28059cafa4 *powerpc-linux.elf/upx-3.91
" > $t/.sha256sums.expected
testsuite_header "$t"
testsuite_header $t
for f in $upx_testsuite_SRCDIR/files/packed/*/upx-3.91*; do
testsuite_split_f "$f"
testsuite_split_f $f
[[ -z $fb ]] && continue
mkdir -p $t/$fsubdir
$upx_exe -d $f -o $t/$fsubdir/$fb
done
testsuite_check_sha "$t"
testsuite_check_sha $t
# /***********************************************************************