Skip to content

Commit e89c185

Browse files
authored
ci: enable repeat tests to use release and force epoll (#5805)
Signed-off-by: Abhijat Malviya <[email protected]>
1 parent c6bc3ea commit e89c185

File tree

2 files changed

+38
-11
lines changed

2 files changed

+38
-11
lines changed

.github/actions/repeat/action.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ inputs:
2929
timeout:
3030
required: true
3131
type: string
32+
epoll:
33+
required: true
34+
type: string
3235

3336
runs:
3437
using: "composite"
@@ -44,9 +47,13 @@ runs:
4447
# used by PyTests
4548
export DRAGONFLY_PATH="${GITHUB_WORKSPACE}/${{inputs.build-folder-name}}/${{inputs.dfly-executable}}"
4649
export UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 # to crash on errors
47-
echo Running command: timeout ${{ inputs.timeout }} pytest ${{ inputs.expression }} --drop-data-after-each-test --color=yes --json-report --json-report-file=report.json --log-cli-level=INFO --count=${{ inputs.count }}
48-
timeout ${{ inputs.timeout }} pytest ${{ inputs.expression }} --drop-data-after-each-test --color=yes --json-report --json-report-file=report.json --log-cli-level=INFO --count=${{ inputs.count }} || code=$?
49-
50+
if [[ "${{ inputs.epoll }}" == "epoll" ]]; then
51+
FORCE_EPOLL="--df force_epoll=true"
52+
else
53+
FORCE_EPOLL=""
54+
fi
55+
echo Running command: timeout ${{ inputs.timeout }} pytest ${{ inputs.expression }} --drop-data-after-each-test ${FORCE_EPOLL} --color=yes --json-report --json-report-file=report.json --log-cli-level=DEBUG --count=${{ inputs.count }}
56+
timeout ${{ inputs.timeout }} pytest ${{ inputs.expression }} --drop-data-after-each-test ${FORCE_EPOLL} --color=yes --json-report --json-report-file=report.json --log-cli-level=DEBUG --count=${{ inputs.count }} || code=$?
5057
# timeout returns 124 if we exceeded the timeout duration
5158
if [[ $code -eq 124 ]]; then
5259
# Add an extra new line here because when tests timeout the first line below continues from the test failure name

.github/workflows/repeat-tests.yml

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ on:
2121
required: false
2222
type: string
2323
default: "60m"
24+
epoll:
25+
description: "Force epoll mode in test"
26+
required: false
27+
type: string
28+
default: "no"
29+
use_release:
30+
description: "Use latest release instead of building dragonfly"
31+
required: false
32+
type: string
33+
default: "no"
2434

2535
jobs:
2636
build:
@@ -52,15 +62,24 @@ jobs:
5262
env
5363
5464
- name: Configure & Build
65+
shell: bash
5566
run: |
56-
# -no-pie to disable address randomization so we could symbolize stacktraces
57-
cmake -B ${GITHUB_WORKSPACE}/build -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -GNinja \
58-
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DPRINT_STACKTRACES_ON_SIGNAL=ON \
59-
-DCMAKE_CXX_FLAGS=-no-pie -DHELIO_STACK_CHECK:STRING=4096
60-
61-
cd ${GITHUB_WORKSPACE}/build && ninja dragonfly
62-
pwd
63-
ls -l ..
67+
if [[ "${{ inputs.use_release }}" == "yes" ]]; then
68+
mkdir "${GITHUB_WORKSPACE}"/build
69+
cd "${GITHUB_WORKSPACE}"/build
70+
wget -q https://github.com/dragonflydb/dragonfly/releases/latest/download/dragonfly-x86_64.tar.gz
71+
tar xf dragonfly-x86_64.tar.gz
72+
mv dragonfly-x86_64 dragonfly
73+
ls -l
74+
else
75+
# -no-pie to disable address randomization so we could symbolize stacktraces
76+
cmake -B ${GITHUB_WORKSPACE}/build -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -GNinja \
77+
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DPRINT_STACKTRACES_ON_SIGNAL=ON \
78+
-DCMAKE_CXX_FLAGS=-no-pie -DHELIO_STACK_CHECK:STRING=4096
79+
cd ${GITHUB_WORKSPACE}/build && ninja dragonfly
80+
pwd
81+
ls -l ..
82+
fi
6483
6584
- name: Run tests on repeat
6685
uses: ./.github/actions/repeat
@@ -74,6 +93,7 @@ jobs:
7493
expression: ${{ inputs.expression }}
7594
count: ${{ inputs.count }}
7695
timeout: ${{ inputs.timeout }}
96+
epoll: ${{ inputs.epoll }}
7797

7898
- name: Upload logs on failure
7999
if: failure()

0 commit comments

Comments
 (0)