File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,12 +130,33 @@ jobs:
130130 sudo apt-get update
131131 sudo apt-get install -y gdb
132132 fi
133- gdb --batch \
134- -ex "set pagination off" \
135- -ex "set print thread-events off" \
136- -ex "run" \
137- -ex "thread apply all bt full" \
138- --args .venv/bin/python -m pytest -vv ./test
133+ echo "Relevant environment:"
134+ env | sort | grep -Ei '^(http|https|all|no|ladybug|lbug|lang|lc_)' || true
135+ echo "Resolved liblbug dependencies:"
136+ ldd "$LBUG_C_API_LIB_PATH"
137+
138+ run_gdb() {
139+ local log_file="$1"
140+ shift
141+ set +e
142+ gdb --batch \
143+ -ex "set pagination off" \
144+ -ex "set print thread-events off" \
145+ -ex "run" \
146+ -ex "thread apply all bt full" \
147+ --args "$@" 2>&1 | tee "$log_file"
148+ local gdb_status=${PIPESTATUS[0]}
149+ set -e
150+ if grep -q "received signal SIGSEGV" "$log_file"; then
151+ echo "gdb caught SIGSEGV" >&2
152+ exit 1
153+ fi
154+ return "$gdb_status"
155+ }
156+
157+ run_gdb .cache/gdb-json-install-smoke.log .venv/bin/python -c 'import shutil, tempfile; from ladybug import Connection; tmp = tempfile.mkdtemp(); conn = Connection(tmp); conn.execute("INSTALL json; LOAD json;"); shutil.rmtree(tmp)'
158+
159+ run_gdb .cache/gdb-capi-pytest.log .venv/bin/python -m pytest -vv ./test
139160
140161 python-ci-pybind :
141162 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments