Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .github/workflows/test_pyqt5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,27 @@ jobs:
- name: Lint with Ruff
run: ruff check --output-format=github datalab
- name: Test with pytest
run: pytest -v --tb=long
run: |
# Keep the core dump of a crashed test process, for the backtrace step below
sudo mkdir -p /tmp/cores && sudo chmod 1777 /tmp/cores || true
sudo sysctl -q -w kernel.core_pattern=/tmp/cores/core.%p || true
ulimit -c unlimited || true
pytest -v --tb=long
- name: Native backtrace of crashed test process
if: failure()
run: |
shopt -s nullglob
cores=(/tmp/cores/core.*)
if [ ${#cores[@]} -eq 0 ]; then
echo "No core dump found"
exit 0
fi
sudo apt-get install -y gdb
python_exe="$(python -c 'import sys; print(sys.executable)')"
for core in "${cores[@]}"; do
echo "===== Backtrace of $core"
gdb -batch -ex "thread apply all bt 50" "$python_exe" "$core"
done

build_latest:
if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && (github.event.inputs.job_to_run == 'all' || github.event.inputs.job_to_run == 'build_latest')) }}
Expand Down
3 changes: 3 additions & 0 deletions datalab/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ def reset_datalab_configuration():
ensure_initialized(load_user_config=False)
reset_to_defaults()
Conf.rpc_server_enabled.set(False)
# Keep pytest's faulthandler, which reports crashes in the test output: the
# application context would redirect it to a log file, then disable it
Conf.faulthandler_enabled.set(False)
try:
yield
finally:
Expand Down
Loading