From 2c663f383385e6069a27d8781e9b143e475f5851 Mon Sep 17 00:00:00 2001 From: Roman Gershman Date: Mon, 25 Nov 2024 19:13:11 +0200 Subject: [PATCH] chore: produce core files in regtests (#4185) Should work only for self-hosted runners. The core files will be kept in /var/crash/ We also copy automatically dragonfly binary into /var/crash to be able to debug later. Signed-off-by: Roman Gershman --- .github/workflows/regression-tests.yml | 20 +++++++++++++++++--- tests/dragonfly/requirements.txt | 2 +- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/regression-tests.yml b/.github/workflows/regression-tests.yml index fd917d50e..4b6b3b8f8 100644 --- a/.github/workflows/regression-tests.yml +++ b/.github/workflows/regression-tests.yml @@ -18,15 +18,19 @@ jobs: container: image: ghcr.io/romange/${{ matrix.container }} options: --security-opt seccomp=unconfined --sysctl "net.ipv6.conf.all.disable_ipv6=0" + volumes: + - /var/crash:/var/crash steps: - uses: actions/checkout@v4 with: submodules: true - - name: Print cpu info - run: cat /proc/cpuinfo - + - name: Print environment info + run: | + cat /proc/cpuinfo + ulimit -a + env - name: Configure & Build run: | # -no-pie to disable address randomization so we could symbolize stacktraces @@ -56,6 +60,16 @@ jobs: name: logs path: /tmp/failed/* + - name: Copy binary on a self hosted runner + if: failure() + run: | + # We must use sh syntax. + if [ "$RUNNER_ENVIRONMENT" = "self-hosted" ]; then + cd ${GITHUB_WORKSPACE}/build + timestamp=$(date +%Y-%m-%d_%H:%M:%S) + mv ./dragonfly /var/crash/dragonfy_${timestamp} + fi + lint-test-chart: runs-on: ubuntu-latest steps: diff --git a/tests/dragonfly/requirements.txt b/tests/dragonfly/requirements.txt index 59c5ae1d9..f6be33893 100644 --- a/tests/dragonfly/requirements.txt +++ b/tests/dragonfly/requirements.txt @@ -15,7 +15,7 @@ pytest-repeat==0.9.3 pymemcache==4.0.0 prometheus_client==0.17.0 aiohttp==3.10.2 -numpy==1.24.3 +numpy pytest-json-report==1.5.0 psutil==5.9.5 boto3==1.28.55