1
0
mirror of https://github.com/upx/upx.git synced 2025-08-07 22:46:51 +08:00

CI updates

This commit is contained in:
Markus F.X.J. Oberhumer
2025-07-17 15:46:12 +02:00
parent 8054543671
commit 9851fba246
2 changed files with 45 additions and 1 deletions

View File

@ -171,7 +171,7 @@ jobs:
jobs="gcc/debug gcc/release clang/debug clang/release"
test "${{ matrix.use_extra }}" = "true" && jobs="$jobs gcc-m32/debug gcc-m32/release"
echo "===== parallel jobs: $jobs"
parallel -kv --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/mimic_ctest.sh' ::: $jobs
parallel -kv --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/mimic_ctest_sigsegv.sh' ::: $jobs
- name: Mimic ctest tests with Valgrind
if: true # note: valgrind is SLOW
run: |

View File

@ -0,0 +1,44 @@
#! /usr/bin/env bash
## vim:set ts=4 sw=4 et:
set -e; set -o pipefail
argv0=$0; argv0abs=$(readlink -fn "$argv0"); argv0dir=$(dirname "$argv0abs")
#
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
#
# mimic running "ctest", i.e. the "test" section of CMakeLists.txt
# - does not redirect stdout
# - allows freely setting $upx_exe_runner, while CMake is restricted to configure-time settings
#
# requires:
# $upx_exe (required, but with convenience fallback "./upx")
# optional settings:
# $upx_exe_runner (e.g. "qemu-x86_64 -cpu Nehalem" or "valgrind")
#
cat >catch-sigsegv.gdb <<'EOF'
catch signal SIGSEGV
commands
x/i $pc
info reg
x/16i $pc-0x20
end
EOF
catcher=$(readlink -fn catch-sigsegv.gdb)
function emu_gdb() {
gdb -q -x "$catcher" <<end_go --args "$@"
run
end_go
}
if [[ -n $upx_exe_runner ]]; then
true
elif [[ -n $CMAKE_CROSSCOMPILING_EMULATOR ]]; then
true
else
upx_exe_runner=emu_gdb
true
fi
source "$argv0dir/mimic_ctest.sh"