Skip to content

Commit 12bd5f9

Browse files
committed
Just run a single test
1 parent b54e2d9 commit 12bd5f9

File tree

2 files changed

+40
-4
lines changed

2 files changed

+40
-4
lines changed

.github/workflows/reusable-san.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ on:
1111
required: false
1212
type: boolean
1313
default: false
14+
test-command:
15+
description: Override the test command when non-empty
16+
required: false
17+
type: string
18+
default: ''
1419
workflow_dispatch:
1520
inputs:
1621
sanitizer:
@@ -21,6 +26,11 @@ on:
2126
required: false
2227
type: boolean
2328
default: false
29+
test-command:
30+
description: Override the test command when non-empty
31+
required: false
32+
type: string
33+
default: ''
2434

2535
env:
2636
FORCE_COLOR: 1
@@ -97,10 +107,16 @@ jobs:
97107
- name: Display build info
98108
run: make pythoninfo
99109
- name: Tests
100-
run: >-
101-
./python -m test
102-
${{ inputs.sanitizer == 'TSan' && '--tsan' || '' }}
103-
-j4
110+
run: |
111+
if [ -n "${TEST_COMMAND}" ]; then
112+
${TEST_COMMAND}
113+
else
114+
./python -m test \
115+
${{ inputs.sanitizer == 'TSan' && '--tsan' || '' }} \
116+
-j4
117+
fi
118+
env:
119+
TEST_COMMAND: ${{ inputs.test-command }}
104120
- name: Parallel tests
105121
if: >-
106122
inputs.sanitizer == 'TSan'
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: TSan Single Test
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
test-command:
7+
description: Test command to run
8+
required: true
9+
default: './python -m test --tsan -j4 test_dict -m test_repr_deep'
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
tsan-single-test:
16+
name: Thread sanitizer (single test)
17+
uses: ./.github/workflows/reusable-san.yml
18+
with:
19+
sanitizer: TSan
20+
test-command: ${{ inputs.test-command }}

0 commit comments

Comments
 (0)