Skip to content

Commit 0157ef5

Browse files
authored
Only add gcov flag when it's specified (scientific-python#183)
Solve problems running in environments without gcov. Fix numpy tests on [x86-64, LP64 OpenBLAS (MSVC)](https://github.com/numpy/numpy/actions/runs/8966988031/job/24623596948?pr=26388#logs) and [x86-64, LP64 OpenBLAS (Clang-cl)](https://github.com/numpy/numpy/actions/runs/8966988031/job/24623597659?pr=26388#logs) ``` Run spin test spin test shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'" env: pythonLocation: C:\hostedtoolcache\windows\Python\3.11.9\x64 PKG_CONFIG_PATH: D:\a\numpy\numpy/.openblas Python_ROOT_DIR: C:\hostedtoolcache\windows\Python\3.11.9\x64 Python2_ROOT_DIR: C:\hostedtoolcache\windows\Python\3.11.9\x64 Python3_ROOT_DIR: C:\hostedtoolcache\windows\Python\3.11.9\x64 Invoking `build` prior to running tests: Error: build() got an unexpected keyword argument 'gcov'; aborting. Error: Process completed with exit code 1. ```
2 parents 83238dd + f184be4 commit 0157ef5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spin/cmds/meson.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,10 @@ def test(
433433
click.secho(
434434
"Invoking `build` prior to running tests:", bold=True, fg="bright_green"
435435
)
436-
ctx.invoke(build_cmd, gcov=bool(gcov))
436+
if gcov is not None:
437+
ctx.invoke(build_cmd, gcov=bool(gcov))
438+
else:
439+
ctx.invoke(build_cmd)
437440

438441
package = cfg.get("tool.spin.package", None)
439442
if (not pytest_args) and (not tests):

0 commit comments

Comments
 (0)