Skip to content

Commit 6c47748

Browse files
committed
chore(CI): add osname and python version to core dump
1 parent fd78561 commit 6c47748

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/test-and-publish.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,12 @@ jobs:
179179
# TODO (Caleb Aikens) figure out how to get Windows core dumps
180180
sudo mkdir -p /cores
181181
sudo chmod 777 /cores
182-
# Core filenames will be of the form executable.pid.timestamp:
183-
sudo bash -c 'echo "/cores/%e.%p.%t" > /proc/sys/kernel/core_pattern'
182+
# Core filenames will be of the form osname.pythonversion.executable.pid.timestamp:
183+
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
184+
sudo bash -c 'echo "/cores/${OSTYPE}.$(poetry run python --version).%e.%p.%t" > /proc/sys/kernel/core_pattern'
185+
else
186+
sudo sysctl kernel.core_pattern="/cores/${OSTYPE}.$(poetry run python --version).%e.%p.%y"
187+
fi
184188
fi
185189
- name: Run Python tests (pytest)
186190
run: |

0 commit comments

Comments
 (0)