Some checks failed
release / linux/x86_64 (pull_request) Failing after 1m54s
release / freebsd/x86_64 (pull_request) Successful in 5m1s
release / linux/aarch64 (pull_request) Failing after 1m54s
release / linux/armv7 (pull_request) Failing after 2m12s
release / linux/i686 (pull_request) Failing after 1m59s
release / android (pull_request) Successful in 2m54s
release / windows/i686 (pull_request) Successful in 2m3s
release / windows/x86_64 (pull_request) Successful in 2m15s
51 lines
1.2 KiB
Bash
Executable file
51 lines
1.2 KiB
Bash
Executable file
#!/bin/sh
|
|
# RAM-only cases under valgrind. Definite leaks are fatal (exit code 42).
|
|
#
|
|
# GPU finalizers are deliberately excluded: a headless/valgrind process has no
|
|
# GL context, so those cases would only exercise the "skip" gate.
|
|
set -u
|
|
|
|
ROOT=$(CDPATH= cd -- "$(dirname "$0")/.." && pwd)
|
|
cd "$ROOT" || exit 1
|
|
export HATE_NO_D_ROOT="$ROOT"
|
|
|
|
if ! command -v valgrind >/dev/null 2>&1; then
|
|
echo "skip valgrind (not installed)"
|
|
exit 0
|
|
fi
|
|
|
|
if [ ! -x ./hate-no-d ]; then
|
|
echo "run-valgrind.sh: ./hate-no-d not built (run make)" >&2
|
|
exit 1
|
|
fi
|
|
|
|
CASES="02_explicit 07_inout 08c_font_atlas 09_pointers 10_ram 11_strings"
|
|
fail=0
|
|
HATE_NO_D_VALGRIND=1
|
|
export HATE_NO_D_VALGRIND
|
|
|
|
for name in $CASES; do
|
|
case="tests/cases/$name.lua"
|
|
if [ ! -f "$case" ]; then
|
|
echo "FAIL $name (missing $case)" >&2
|
|
fail=1
|
|
continue
|
|
fi
|
|
echo "valgrind $name"
|
|
if valgrind --quiet --error-exitcode=42 \
|
|
--leak-check=full --show-leak-kinds=definite \
|
|
--errors-for-leak-kinds=definite \
|
|
--suppressions=tests/valgrind.supp \
|
|
./hate-no-d "$case"; then
|
|
:
|
|
else
|
|
status=$?
|
|
echo "FAIL $name (valgrind exit $status)" >&2
|
|
fail=1
|
|
fi
|
|
done
|
|
|
|
if [ "$fail" -eq 0 ]; then
|
|
echo "check-valgrind: ok"
|
|
fi
|
|
exit "$fail"
|