Skip to content

Commit 92c5d6d

Browse files
committed
tests: pass via flag instead of envvar
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 7015400 commit 92c5d6d

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,8 @@ jobs:
204204
path: wheelhouse/*.whl
205205

206206
- name: Test cibuildwheel
207-
env:
208-
CIBW_PLATFORM: ${{ matrix.platform }}
209207
run: |
210-
uv run --no-sync bin/run_tests.py ${{ (runner.os == 'Linux' && runner.arch == 'X64') && '--run-podman' || '' }}
208+
uv run --no-sync bin/run_tests.py --platform=${{ matrix.platform || 'native' }} ${{ (runner.os == 'Linux' && runner.arch == 'X64') && '--run-podman' || '' }}
211209
212210
emulated-archs:
213211
name: Get qemu emulated architectures

bin/run_tests.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
default=default_cpu_count,
2828
help="number of processes to use for testing",
2929
)
30+
parser.add_argument(
31+
"--platform",
32+
choices={"all", "native", "android", "ios", "pyodide"},
33+
default="all",
34+
help="Either 'native' or 'android'/'ios'/'pyodide'",
35+
)
3036
args = parser.parse_args()
3137

3238
# move cwd to the project root
@@ -62,11 +68,11 @@
6268
"test",
6369
"-vv",
6470
]
65-
match os.environ.get("CIBW_PLATFORM", "native"):
66-
case "":
67-
serial_integration_test_args += ["-m not pyodide", "-m not android", "-m not ios"]
68-
case "native":
71+
match args.platform:
72+
case "all":
6973
pass
74+
case "native":
75+
serial_integration_test_args += ["-m not pyodide", "-m not android", "-m not ios"]
7076
case platform:
7177
serial_integration_test_args += [f"-m {platform}"]
7278

0 commit comments

Comments
 (0)