Add check_whitespace.sh and call it from Makefile. Update Travis.
This commit is contained in:
+3
-1
@@ -4,7 +4,7 @@
|
|||||||
os: Visual Studio 2015
|
os: Visual Studio 2015
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
global: { TRAVIS_OS_NAME: windows, C: "", B: release, CROSS: "", T: "" }
|
global: { TRAVIS_OS_NAME: windows, CROSS: "", C: "", B: release, T: "" }
|
||||||
matrix:
|
matrix:
|
||||||
- { C: msvc-10.0-x86, CL_VERSION: 16.00, VS_VERSION: 2010 }
|
- { C: msvc-10.0-x86, CL_VERSION: 16.00, VS_VERSION: 2010 }
|
||||||
### - { C: msvc-10.0-x64, CL_VERSION: 16.00, VS_VERSION: 2010 } # AppVeyor: x64 compiler is not installed
|
### - { C: msvc-10.0-x64, CL_VERSION: 16.00, VS_VERSION: 2010 } # AppVeyor: x64 compiler is not installed
|
||||||
@@ -20,6 +20,8 @@ environment:
|
|||||||
init:
|
init:
|
||||||
- git config --global core.autocrlf input
|
- git config --global core.autocrlf input
|
||||||
- where bash & where cat & where curl & where git & where sed & where tar
|
- where bash & where cat & where curl & where git & where sed & where tar
|
||||||
|
# - bash --version & git --version & sed --version & tar --version
|
||||||
|
- git --version & bash --version
|
||||||
# - dir "c:\Program Files\Git\usr\bin"
|
# - dir "c:\Program Files\Git\usr\bin"
|
||||||
# - dir "c:\cygwin\bin"
|
# - dir "c:\cygwin\bin"
|
||||||
# - dir "c:\mingw\bin"
|
# - dir "c:\mingw\bin"
|
||||||
|
|||||||
+1
-1
@@ -9,9 +9,9 @@ branches:
|
|||||||
machine:
|
machine:
|
||||||
environment:
|
environment:
|
||||||
TRAVIS_OS_NAME: linux
|
TRAVIS_OS_NAME: linux
|
||||||
|
CROSS:
|
||||||
C: gcc-4.8-m64
|
C: gcc-4.8-m64
|
||||||
B: release
|
B: release
|
||||||
CROSS:
|
|
||||||
T:
|
T:
|
||||||
|
|
||||||
checkout:
|
checkout:
|
||||||
|
|||||||
+12
-35
@@ -24,35 +24,11 @@ echo "$CC --version"; $CC --version
|
|||||||
echo "$CXX --version"; $CXX --version
|
echo "$CXX --version"; $CXX --version
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# whitespace
|
# check whitespace
|
||||||
if [[ $TRAVIS_OS_NAME == linux ]]; then
|
if [[ $TRAVIS_OS_NAME == linux ]]; then
|
||||||
cd / && cd $upx_SRCDIR || exit 1
|
cd / && cd $upx_SRCDIR || exit 1
|
||||||
echo "Checking source code for whitespace violations..."
|
echo "Checking source code for whitespace violations..."
|
||||||
find . \
|
bash ./src/stub/scripts/check_whitespace.sh || exit 1
|
||||||
-type d -name '.git' -prune -o \
|
|
||||||
-type d -name '.hg' -prune -o \
|
|
||||||
-type d -name 'build' -prune -o \
|
|
||||||
-type d -name 'tmp' -prune -o \
|
|
||||||
-type f -iname '*.bat' -prune -o \
|
|
||||||
-type f -iname '*.exe' -prune -o \
|
|
||||||
-type f -iname '*.pdf' -prune -o \
|
|
||||||
-type f -print0 | LC_ALL=C sort -z | \
|
|
||||||
xargs -0r perl -n -e '
|
|
||||||
if (m,[\r\x1a],) { print "ERROR: DOS EOL detected $ARGV: $_"; exit(1); }
|
|
||||||
if (m,([ \t]+)$,) {
|
|
||||||
# allow exactly two trailing spaces for GitHub flavoured Markdown in .md files
|
|
||||||
if ($1 ne " " || $ARGV !~ m,\.md$,) {
|
|
||||||
print "ERROR: trailing whitespace detected $ARGV: $_"; exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (m,\t,) {
|
|
||||||
if ($ARGV =~ m,(^|/)\.gitmodules$,) { }
|
|
||||||
elsif ($ARGV =~ m,(^|/)(gnu|m)?make(file|vars),i) { }
|
|
||||||
elsif ($ARGV =~ m,/tmp/.*\.(disasm|dump)$,) { }
|
|
||||||
elsif ($ARGV =~ m,/src/stub/src/arch/.*\.S$,) { }
|
|
||||||
else { print "ERROR: hard TAB detected $ARGV: $_"; exit(1); }
|
|
||||||
}
|
|
||||||
' || exit 1
|
|
||||||
echo " Passed."
|
echo " Passed."
|
||||||
fi # linux
|
fi # linux
|
||||||
|
|
||||||
@@ -64,7 +40,7 @@ set -x
|
|||||||
|
|
||||||
cd / && cd $ucl_BUILDDIR || exit 1
|
cd / && cd $ucl_BUILDDIR || exit 1
|
||||||
if [[ -n $BM_CROSS || $TRAVIS_OS_NAME == windows ]]; then
|
if [[ -n $BM_CROSS || $TRAVIS_OS_NAME == windows ]]; then
|
||||||
# configure is too old
|
# ucl-1.03/configure is too old - build manually
|
||||||
rm -f ./*.o libucl.a
|
rm -f ./*.o libucl.a
|
||||||
$CC -O2 -I$ucl_SRCDIR/include -I$ucl_SRCDIR -c $ucl_SRCDIR/src/*.c
|
$CC -O2 -I$ucl_SRCDIR/include -I$ucl_SRCDIR -c $ucl_SRCDIR/src/*.c
|
||||||
$AR rcs libucl.a *.o
|
$AR rcs libucl.a *.o
|
||||||
@@ -81,12 +57,13 @@ fi
|
|||||||
# build zlib
|
# build zlib
|
||||||
#
|
#
|
||||||
|
|
||||||
if [[ $BUILD_LOCAL_ZLIB ]]; then
|
if [[ $BUILD_LOCAL_ZLIB == 1 ]]; then
|
||||||
cd / && cd $zlib_BUILDDIR || exit 1
|
cd / && cd $zlib_BUILDDIR || exit 1
|
||||||
|
# build manually
|
||||||
rm -f ./*.o libz.a
|
rm -f ./*.o libz.a
|
||||||
$CC -O2 -c $zlib_SRCDIR/*.c
|
$CC -O2 -c $zlib_SRCDIR/*.c
|
||||||
$AR rcs libz.a *.o
|
$AR rcs libz.a *.o
|
||||||
fi # BUILD_LOCAL_ZLIB
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# build UPX
|
# build UPX
|
||||||
@@ -97,7 +74,7 @@ cd / && cd $upx_BUILDDIR || exit 1
|
|||||||
make="make -f $upx_SRCDIR/src/Makefile"
|
make="make -f $upx_SRCDIR/src/Makefile"
|
||||||
EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS -DUCL_NO_ASM"
|
EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS -DUCL_NO_ASM"
|
||||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L$ucl_BUILDDIR/src/.libs"
|
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L$ucl_BUILDDIR/src/.libs"
|
||||||
if [[ $BUILD_LOCAL_ZLIB ]]; then
|
if [[ $BUILD_LOCAL_ZLIB == 1 ]]; then
|
||||||
EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS -I$zlib_SRCDIR"
|
EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS -I$zlib_SRCDIR"
|
||||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L$zlib_BUILDDIR"
|
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L$zlib_BUILDDIR"
|
||||||
fi
|
fi
|
||||||
@@ -124,11 +101,11 @@ if [[ $BM_B =~ (^|\+)ALLOW_FAIL($|\+) ]]; then
|
|||||||
fi
|
fi
|
||||||
export EXTRA_CPPFLAGS EXTRA_CXXFLAGS EXTRA_LDFLAGS
|
export EXTRA_CPPFLAGS EXTRA_CXXFLAGS EXTRA_LDFLAGS
|
||||||
|
|
||||||
$make
|
[[ -z $upx_exeext ]] && upx_exeext=.out
|
||||||
|
$make exeext=$upx_exeext
|
||||||
|
|
||||||
[[ -z $exeext ]] && exeext=.out
|
ls -l upx${upx_exeext}
|
||||||
ls -l upx${exeext}
|
$SIZE upx${upx_exeext} || true
|
||||||
$SIZE upx${exeext} || true
|
file upx${upx_exeext}
|
||||||
file upx${exeext}
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
+25
-20
@@ -6,12 +6,12 @@
|
|||||||
#set -x # debug
|
#set -x # debug
|
||||||
umask 022
|
umask 022
|
||||||
|
|
||||||
# rename short Build-Matrix variables to more readable names
|
# rename short variables to more readable Build-Matrix BM_ names
|
||||||
# C is COMPILER
|
# C is COMPILER
|
||||||
# B is BUILD_TYPE
|
# B is BUILD_OPTIONS
|
||||||
# T is TESTSUITE_FLAGS
|
# T is TESTSUITE_OPTIONS
|
||||||
BM_C=$C; BM_B=$B; BM_CROSS=$CROSS; BM_T=$T
|
BM_CROSS=$CROSS; BM_C=$C; BM_B=$B; BM_T=$T
|
||||||
unset C B CROSS T
|
unset CROSS C B T
|
||||||
[[ -z $BM_C ]] && BM_C=gcc
|
[[ -z $BM_C ]] && BM_C=gcc
|
||||||
[[ -z $BM_B ]] && BM_B=release
|
[[ -z $BM_B ]] && BM_B=release
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ CC=false CXX=false SCAN_BUILD=false
|
|||||||
AR=ar SIZE=size
|
AR=ar SIZE=size
|
||||||
if [[ -n $APPVEYOR_JOB_ID ]]; then
|
if [[ -n $APPVEYOR_JOB_ID ]]; then
|
||||||
BUILD_LOCAL_ZLIB=1
|
BUILD_LOCAL_ZLIB=1
|
||||||
export exeext=.exe
|
upx_exeext=.exe
|
||||||
# dir c:\cygwin
|
# dir c:\cygwin
|
||||||
case $BM_C in
|
case $BM_C in
|
||||||
gcc-m32 | gcc-4.9-m32)
|
gcc-m32 | gcc-4.9-m32)
|
||||||
@@ -68,7 +68,7 @@ if [[ -n $BM_CROSS ]]; then
|
|||||||
case $BM_CROSS-$BM_C in
|
case $BM_CROSS-$BM_C in
|
||||||
arm-linux-gnueabi-gcc | arm-linux-gnueabi-gcc-4.6)
|
arm-linux-gnueabi-gcc | arm-linux-gnueabi-gcc-4.6)
|
||||||
export upx_EXTRA_LDFLAGS="-static-libgcc -static-libstdc++"
|
export upx_EXTRA_LDFLAGS="-static-libgcc -static-libstdc++"
|
||||||
[[ -z $upx_qemu ]] && upx_qemu="qemu-arm-static -L/usr/arm-linux-gnueabi"
|
[[ -z $upx_qemu ]] && upx_qemu="qemu-arm -L/usr/arm-linux-gnueabi"
|
||||||
x=arm-linux-gnueabi; AR="$x-ar"; CC="$x-gcc"; CXX="$x-g++" ;;
|
x=arm-linux-gnueabi; AR="$x-ar"; CC="$x-gcc"; CXX="$x-g++" ;;
|
||||||
arm-linux-gnueabihf-gcc | arm-linux-gnueabihf-gcc-4.6)
|
arm-linux-gnueabihf-gcc | arm-linux-gnueabihf-gcc-4.6)
|
||||||
export upx_EXTRA_LDFLAGS="-static-libgcc -static-libstdc++"
|
export upx_EXTRA_LDFLAGS="-static-libgcc -static-libstdc++"
|
||||||
@@ -142,22 +142,28 @@ done
|
|||||||
[[ -z $lcov_OUTPUTDIR ]] && lcov_OUTPUTDIR=$(readlink -mn -- "$toptop_bdir/.lcov-results")
|
[[ -z $lcov_OUTPUTDIR ]] && lcov_OUTPUTDIR=$(readlink -mn -- "$toptop_bdir/.lcov-results")
|
||||||
unset toptop_builddir toptop_bdir
|
unset toptop_builddir toptop_bdir
|
||||||
|
|
||||||
# ensure absolute dirs
|
# ensure absolute directories
|
||||||
|
make_absolute() {
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
if [[ -n ${!1} ]]; then
|
||||||
|
d=$(readlink -mn -- "${!1}")
|
||||||
|
eval $1="$d"
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
}
|
||||||
for var_prefix in ucl upx upx_testsuite zlib; do
|
for var_prefix in ucl upx upx_testsuite zlib; do
|
||||||
for var_suffix in _BUILDDIR _SRCDIR; do
|
for var_suffix in _BUILDDIR _SRCDIR; do
|
||||||
var_name=${var_prefix}${var_suffix}
|
make_absolute ${var_prefix}${var_suffix}
|
||||||
if [[ -n ${!var_name} ]]; then
|
done
|
||||||
d=$(readlink -mn -- "${!var_name}")
|
|
||||||
eval $var_name="$d"
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
done
|
make_absolute lcov_OUTPUTDIR
|
||||||
unset var_name var_prefix var_suffix
|
unset var_prefix var_suffix
|
||||||
|
|
||||||
print_settings() {
|
print_settings() {
|
||||||
local v var_prefix var_suffix
|
local v var_prefix var_suffix
|
||||||
# Build Matrix
|
# Build Matrix
|
||||||
for v in TRAVIS_OS_NAME BM_C BM_B BM_CROSS BM_T; do
|
for v in TRAVIS_OS_NAME BM_CROSS BM_C BM_B BM_T; do
|
||||||
[[ -n ${!v} ]] && echo "${v}='${!v}'"
|
[[ -n ${!v} ]] && echo "${v}='${!v}'"
|
||||||
done
|
done
|
||||||
# BM_C related
|
# BM_C related
|
||||||
@@ -166,8 +172,8 @@ print_settings() {
|
|||||||
v=EXTRA_${v}
|
v=EXTRA_${v}
|
||||||
[[ -n ${!v} ]] && echo "${v}='${!v}'"
|
[[ -n ${!v} ]] && echo "${v}='${!v}'"
|
||||||
done
|
done
|
||||||
# dirs and other info
|
# directories and other info
|
||||||
for v in TRAVIS_XCODE_SDK UPX_UCLDIR; do
|
for v in TRAVIS_XCODE_SDK UPX_UCLDIR lcov_OUTPUTDIR; do
|
||||||
[[ -n ${!v} ]] && echo "${v}='${!v}'"
|
[[ -n ${!v} ]] && echo "${v}='${!v}'"
|
||||||
done
|
done
|
||||||
for var_prefix in ucl upx upx_testsuite zlib; do
|
for var_prefix in ucl upx upx_testsuite zlib; do
|
||||||
@@ -179,5 +185,4 @@ print_settings() {
|
|||||||
##env | LC_ALL=C sort
|
##env | LC_ALL=C sort
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
true
|
true
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ argv0="$0"; argv0dir=$(readlink -en -- "$0"); argv0dir=$(dirname "$argv0dir")
|
|||||||
fi
|
fi
|
||||||
source "$argv0dir/travis_init.sh" || exit 1
|
source "$argv0dir/travis_init.sh" || exit 1
|
||||||
|
|
||||||
# BM_T is TESTSUITE_FLAGS
|
|
||||||
if [[ $BM_T =~ (^|\+)SKIP($|\+) ]]; then
|
if [[ $BM_T =~ (^|\+)SKIP($|\+) ]]; then
|
||||||
echo "UPX testsuite SKIPPED."
|
echo "UPX testsuite SKIPPED."
|
||||||
exit 0
|
exit 0
|
||||||
@@ -58,32 +57,33 @@ testsuite_check_sha() {
|
|||||||
diff -u $1/.sha256sums.expected $1/.sha256sums.current || true
|
diff -u $1/.sha256sums.expected $1/.sha256sums.current || true
|
||||||
#exit 1
|
#exit 1
|
||||||
exit_code=1
|
exit_code=1
|
||||||
|
let num_errors+=1 || true
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
testsuite_run_compress() {
|
testsuite_run_compress() {
|
||||||
testsuite_header $testdir
|
testsuite_header $testdir
|
||||||
local f ff
|
local f
|
||||||
for f in $upx_testsuite_SRCDIR/files/packed/*/upx-3.91*; do
|
for f in t01_decompressed/*/*; do
|
||||||
testsuite_split_f $f
|
testsuite_split_f $f
|
||||||
[[ -z $fb ]] && continue
|
[[ -z $fb ]] && continue
|
||||||
mkdir -p $testdir/$fsubdir
|
mkdir -p $testdir/$fsubdir
|
||||||
ff=t01_decompressed/$fsubdir/$fb
|
$upx_run --prefer-ucl "$@" $f -o $testdir/$fsubdir/$fb
|
||||||
$upx_exe --prefer-ucl "$@" $ff -o $testdir/$fsubdir/$fb
|
|
||||||
done
|
done
|
||||||
testsuite_check_sha $testdir
|
testsuite_check_sha $testdir
|
||||||
$upx_exe -l $testdir/*/*
|
$upx_run -l $testdir/*/*
|
||||||
$upx_exe --file-info $testdir/*/*
|
$upx_run --file-info $testdir/*/*
|
||||||
$upx_exe -t $testdir/*/*
|
$upx_run -t $testdir/*/*
|
||||||
}
|
}
|
||||||
|
|
||||||
# /***********************************************************************
|
# /***********************************************************************
|
||||||
# // init
|
# // init
|
||||||
# ************************************************************************/
|
# ************************************************************************/
|
||||||
|
|
||||||
#set -x
|
#set -x # debug
|
||||||
exit_code=0
|
exit_code=0
|
||||||
|
num_errors=0
|
||||||
|
|
||||||
if [[ $BM_T =~ (^|\+)ALLOW_FAIL($|\+) ]]; then
|
if [[ $BM_T =~ (^|\+)ALLOW_FAIL($|\+) ]]; then
|
||||||
echo "ALLOW_FAIL"
|
echo "ALLOW_FAIL"
|
||||||
@@ -93,32 +93,38 @@ fi
|
|||||||
[[ -z $upx_exe && -f $upx_BUILDDIR/upx.out ]] && upx_exe=$upx_BUILDDIR/upx.out
|
[[ -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
|
[[ -z $upx_exe && -f $upx_BUILDDIR/upx.exe ]] && upx_exe=$upx_BUILDDIR/upx.exe
|
||||||
if [[ -z $upx_exe ]]; then exit 1; fi
|
if [[ -z $upx_exe ]]; then exit 1; fi
|
||||||
|
upx_run=$upx_exe
|
||||||
if [[ $BM_T =~ (^|\+)qemu($|\+) && -n $upx_qemu ]]; then
|
if [[ $BM_T =~ (^|\+)qemu($|\+) && -n $upx_qemu ]]; then
|
||||||
upx_exe="$upx_qemu $upx_qemu_flags -- $upx_exe"
|
upx_run="$upx_qemu $upx_qemu_flags -- $upx_exe"
|
||||||
fi
|
fi
|
||||||
if [[ $BM_T =~ (^|\+)wine($|\+) && -n $upx_wine ]]; then
|
if [[ $BM_T =~ (^|\+)wine($|\+) && -n $upx_wine ]]; then
|
||||||
upx_exe="$upx_wine $upx_wine_flags $upx_exe"
|
upx_run="$upx_wine $upx_wine_flags $upx_exe"
|
||||||
fi
|
fi
|
||||||
if ! $upx_exe --version >/dev/null; then exit 1; fi
|
|
||||||
|
|
||||||
if [[ $BM_T =~ (^|\+)valgrind($|\+) ]]; then
|
if [[ $BM_T =~ (^|\+)valgrind($|\+) ]]; then
|
||||||
valgrind_flags="--leak-check=full --show-reachable=yes"
|
if [[ -z $upx_valgrind ]]; then
|
||||||
valgrind_flags="-q --leak-check=no --error-exitcode=1"
|
upx_valgrind="valgrind"
|
||||||
valgrind_flags="--leak-check=no --error-exitcode=1"
|
fi
|
||||||
upx_exe="valgrind $valgrind_flags $upx_exe"
|
if [[ -z $upx_valgrind_flags ]]; then
|
||||||
|
upx_valgrind_flags="--leak-check=full --show-reachable=yes"
|
||||||
|
upx_valgrind_flags="-q --leak-check=no --error-exitcode=1"
|
||||||
|
upx_valgrind_flags="--leak-check=no --error-exitcode=1"
|
||||||
|
fi
|
||||||
|
upx_run="$upx_valgrind $upx_valgrind_flags $upx_exe"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $BM_B =~ (^|\+)coverage($|\+) ]]; then
|
if [[ $BM_B =~ (^|\+)coverage($|\+) ]]; then
|
||||||
(cd / && cd $upx_BUILDDIR && lcov -d . --zerocounters)
|
(cd / && cd $upx_BUILDDIR && lcov -d . --zerocounters)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf ./testsuite_1
|
|
||||||
mkdir testsuite_1
|
|
||||||
cd testsuite_1
|
|
||||||
|
|
||||||
export UPX=
|
export UPX=
|
||||||
export UPX="--no-color --no-progress"
|
export UPX="--no-color --no-progress"
|
||||||
|
|
||||||
|
# let's go
|
||||||
|
if ! $upx_run --version >/dev/null; then exit 1; fi
|
||||||
|
rm -rf ./testsuite_1
|
||||||
|
mkbuilddirs testsuite_1
|
||||||
|
cd testsuite_1 || exit 1
|
||||||
|
|
||||||
|
|
||||||
# /***********************************************************************
|
# /***********************************************************************
|
||||||
# // decompression tests
|
# // decompression tests
|
||||||
@@ -142,7 +148,7 @@ for f in $upx_testsuite_SRCDIR/files/packed/*/upx-3.91*; do
|
|||||||
testsuite_split_f $f
|
testsuite_split_f $f
|
||||||
[[ -z $fb ]] && continue
|
[[ -z $fb ]] && continue
|
||||||
mkdir -p $testdir/$fsubdir
|
mkdir -p $testdir/$fsubdir
|
||||||
$upx_exe -d $f -o $testdir/$fsubdir/$fb
|
$upx_run -d $f -o $testdir/$fsubdir/$fb
|
||||||
done
|
done
|
||||||
testsuite_check_sha $testdir
|
testsuite_check_sha $testdir
|
||||||
|
|
||||||
@@ -222,10 +228,21 @@ a647ed1aea16f58b544228279ad7159cd3ec5c3533efef1fd2df5a5a59b5d663 *i386-win32.pe/
|
|||||||
time testsuite_run_compress --all-methods --no-lzma --no-filter
|
time testsuite_run_compress --all-methods --no-lzma --no-filter
|
||||||
|
|
||||||
|
|
||||||
|
testsuite_header "UPX testsuite summary"
|
||||||
|
echo "upx_exe='$upx_exe'"
|
||||||
|
if [[ $upx_run != $upx_exe ]]; then
|
||||||
|
echo "upx_run='$upx_run'"
|
||||||
|
fi
|
||||||
|
if [[ -f $upx_exe ]]; then
|
||||||
|
ls -l "$upx_exe"
|
||||||
|
file "$upx_exe" || true
|
||||||
|
fi
|
||||||
|
echo "upx_testsuite_SRCDIR='$upx_testsuite_SRCDIR'"
|
||||||
|
echo "upx_testsuite_BUILDDIR='$upx_testsuite_BUILDDIR'"
|
||||||
echo
|
echo
|
||||||
if [[ $exit_code == 0 ]]; then
|
if [[ $exit_code == 0 ]]; then
|
||||||
echo "UPX testsuite passed. All done."
|
echo "UPX testsuite passed. All done."
|
||||||
else
|
else
|
||||||
echo "UPX-ERROR: UPX testsuite FAILED. See log file."
|
echo "UPX-ERROR: UPX testsuite FAILED with $num_errors error(s). See log file."
|
||||||
fi
|
fi
|
||||||
exit $exit_code
|
exit $exit_code
|
||||||
|
|||||||
+5
-5
@@ -24,7 +24,7 @@ addons:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- C= B= CROSS= T=
|
- CROSS= C= B= T=
|
||||||
matrix:
|
matrix:
|
||||||
- TRAVIS_EMPTY_JOB_WORKAROUND=true
|
- TRAVIS_EMPTY_JOB_WORKAROUND=true
|
||||||
|
|
||||||
@@ -140,19 +140,19 @@ matrix:
|
|||||||
addons: { apt: { sources: *S, packages: [ "clang-3.8" ] } }
|
addons: { apt: { sources: *S, packages: [ "clang-3.8" ] } }
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-4.6 CROSS=arm-linux-gnueabi T=SKIP
|
env: CROSS=arm-linux-gnueabi C=gcc-4.6 T=SKIP
|
||||||
addons: { apt: { packages: [ "g++-arm-linux-gnueabi", "qemu-user" ] } }
|
addons: { apt: { packages: [ "g++-arm-linux-gnueabi", "qemu-user" ] } }
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-4.6 CROSS=arm-linux-gnueabihf T=SKIP
|
env: CROSS=arm-linux-gnueabihf C=gcc-4.6 T=SKIP
|
||||||
addons: { apt: { packages: [ "g++-arm-linux-gnueabihf", "qemu-user" ] } }
|
addons: { apt: { packages: [ "g++-arm-linux-gnueabihf", "qemu-user" ] } }
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-4.6 CROSS=i386-w64-mingw32 T=wine
|
env: CROSS=i386-w64-mingw32 C=gcc-4.6 T=wine
|
||||||
addons: { apt: { packages: [ "binutils-mingw-w64-i686", "g++-mingw-w64-i686", "wine" ] } }
|
addons: { apt: { packages: [ "binutils-mingw-w64-i686", "g++-mingw-w64-i686", "wine" ] } }
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-4.6 CROSS=x86_64-w64-mingw32 T=wine
|
env: CROSS=x86_64-w64-mingw32 C=gcc-4.6 T=wine
|
||||||
addons: { apt: { packages: [ "binutils-mingw-w64-x86-64", "g++-mingw-w64-x86-64", "wine" ] } }
|
addons: { apt: { packages: [ "binutils-mingw-w64-x86-64", "g++-mingw-w64-x86-64", "wine" ] } }
|
||||||
- os: osx
|
- os: osx
|
||||||
compiler: clang
|
compiler: clang
|
||||||
|
|||||||
+6
-1
@@ -85,7 +85,7 @@ compress_lzma$(objext) filteri$(objext) : CXXFLAGS := $(filter-out $(CXXFLAGS_SA
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
all: upx$(exeext) | ./.depend
|
all: check-whitespace upx$(exeext) | ./.depend
|
||||||
.DELETE_ON_ERROR: upx$(exeext) $(upx_OBJECTS) ./.depend
|
.DELETE_ON_ERROR: upx$(exeext) $(upx_OBJECTS) ./.depend
|
||||||
|
|
||||||
upx$(exeext): $(upx_OBJECTS) $(upx_DEPENDENCIES)
|
upx$(exeext): $(upx_OBJECTS) $(upx_DEPENDENCIES)
|
||||||
@@ -106,6 +106,11 @@ else
|
|||||||
.PHONY: ./.depend
|
.PHONY: ./.depend
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(shell uname),Linux)
|
||||||
|
check-whitespace : ; bash $(top_srcdir)/src/stub/scripts/check_whitespace.sh $(top_srcdir)
|
||||||
|
endif
|
||||||
|
.PHONY: check-whitespace
|
||||||
|
|
||||||
|
|
||||||
./.depend compress_lzma$(objext) : INCLUDES += -I$(UPX_LZMADIR)
|
./.depend compress_lzma$(objext) : INCLUDES += -I$(UPX_LZMADIR)
|
||||||
|
|
||||||
|
|||||||
Executable
+33
@@ -0,0 +1,33 @@
|
|||||||
|
#! /usr/bin/env bash
|
||||||
|
## vim:set ts=4 sw=4 et:
|
||||||
|
set -e; set -o pipefail
|
||||||
|
|
||||||
|
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
|
||||||
|
|
||||||
|
[[ -z $1 ]] || cd "$1" || exit 1
|
||||||
|
|
||||||
|
find . \
|
||||||
|
-type d -name '.git' -prune -o \
|
||||||
|
-type d -name '.hg' -prune -o \
|
||||||
|
-type d -name 'build*' -prune -o \
|
||||||
|
-type d -name 'tmp*' -prune -o \
|
||||||
|
-type f -iname '*.bat' -prune -o \
|
||||||
|
-type f -iname '*.exe' -prune -o \
|
||||||
|
-type f -iname '*.pdf' -prune -o \
|
||||||
|
-type f -print0 | LC_ALL=C sort -z | \
|
||||||
|
xargs -0r perl -n -e '
|
||||||
|
if (m,[\r\x1a],) { print "ERROR: DOS EOL detected $ARGV: $_"; exit(1); }
|
||||||
|
if (m,([ \t]+)$,) {
|
||||||
|
# allow exactly two trailing spaces for GitHub flavoured Markdown in .md files
|
||||||
|
if ($1 ne " " || $ARGV !~ m,\.md$,) {
|
||||||
|
print "ERROR: trailing whitespace detected $ARGV: $_"; exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (m,\t,) {
|
||||||
|
if ($ARGV =~ m,(^|/)\.gitmodules$,) { }
|
||||||
|
elsif ($ARGV =~ m,(^|/)(gnu|m)?make(file|vars),i) { }
|
||||||
|
elsif ($ARGV =~ m,/tmp/.*\.(disasm|dump)$,) { }
|
||||||
|
elsif ($ARGV =~ m,/src/stub/src/arch/.*\.S$,) { }
|
||||||
|
else { print "ERROR: hard TAB detected $ARGV: $_"; exit(1); }
|
||||||
|
}
|
||||||
|
' || exit 1
|
||||||
Reference in New Issue
Block a user