Skip to content

Commit 448a8d6

Browse files
committed
Probe (temporary): dev agent tests on ubuntu and windows, with and without SO_EXCLUSIVEADDRUSE (#238)
1 parent 6a93b18 commit 448a8d6

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Dev agent probe (one-off, #238)
2+
3+
# Temporary: this branch is deleted after one run. It checks the dev-agent job on ubuntu and windows, and that
4+
# on Windows the port-takeover test fails once SO_EXCLUSIVEADDRUSE is removed.
5+
on:
6+
push:
7+
branches: [ "feat/devagent-ci-probe" ]
8+
9+
jobs:
10+
probe:
11+
name: ${{ matrix.os }} / exclusive=${{ matrix.exclusive }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: [ubuntu-latest, windows-latest]
17+
exclusive: [kept, removed]
18+
exclude:
19+
- os: ubuntu-latest
20+
exclusive: removed
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: actions/setup-python@v5
24+
with:
25+
python-version: '3.x'
26+
- name: Remove SO_EXCLUSIVEADDRUSE
27+
if: matrix.exclusive == 'removed'
28+
shell: python
29+
run: |
30+
p = "python-multiplatform/src/commonMain/python/python_multiplatform_devagent.py"
31+
s = open(p, encoding="utf-8").read()
32+
old = 'if hasattr(socket, "SO_EXCLUSIVEADDRUSE"):'
33+
assert s.count(old) == 1
34+
open(p, "w", encoding="utf-8").write(s.replace(old, "if False:"))
35+
- name: Dev agent protocol tests
36+
working-directory: python-multiplatform/src/test/python
37+
run: python -m unittest -v test_devagent

0 commit comments

Comments
 (0)