Skip to content

Build sd.cpp test fixtures from _binary_names() instead of the POSIX literal - #9707

Merged
oobabooga merged 2 commits into
unslothai:mainfrom
derrickrajkumar10:fix/sd-cpp-test-fixtures-windows
Aug 26, 2026
Merged

oobabooga merged 2 commits into
unslothai:mainfrom
derrickrajkumar10:fix/sd-cpp-test-fixtures-windows

Conversation

@derrickrajkumar10

Copy link
Copy Markdown
Contributor

Fixes #9607.

The fixtures in test_sd_cpp_install.py build synthetic archives with a member literally named sd-cli. On Windows _binary_names() returns ("sd-cli.exe", "sd-server.exe"), so install() correctly refuses an archive that supplied no sd-cli.exe. The product code is right, the fixtures were wrong. studio/install_sd_cpp_prebuilt.py is untouched.

Member names and their assertions now derive from _binary_names(), following the _CLI pattern already at line 411 and the suffix pattern already used in the accelerator swap tests.

Measured on Windows 11, Python 3.11.9, at 4df68a4:

before: 66 failed, 90 passed, 1 skipped
after:  48 failed, 108 passed, 1 skipped

18 tests fixed, and no contained no sd-cli binary failures remain in the file. Comparing the sorted failure sets, nothing moved into the failing set: the after-set is a strict subset of the before-set, so there are no regressions and no accidental fixes outside the name family.

My absolute counts differ from the ones in the issue because I ran without the studio venv, which turns some of your skips into failures. The set comparison is unaffected. The cudart 404 assertions, the regex assertion and the OSError are still failing and are deliberately out of scope here, as is the question of whether a Windows CI leg should exist for this file.

@danielhanchen

Copy link
Copy Markdown
Member

Confirmed the fixtures in studio/backend/tests/test_sd_cpp_install.py hard-code sd-cli while _binary_names() returns sd-cli.exe on Windows, and deriving the member names from it is the right fix. Will get this reviewed.

@oobabooga

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: e4115b5392

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@derrickrajkumar10

Copy link
Copy Markdown
Contributor Author

Updated the branch to pick up the write_text() encoding fix on main. That was the only real failure in Backend CI (1 failed, 14059 passed, in tests/test_source_read_encoding.py, unrelated to this PR).

Workflows need approval again since the merge commit reset them.

@oobabooga

Copy link
Copy Markdown
Member

Thanks! This fixes the Windows-only failures in test_sd_cpp_install.py by deriving fixture names from _binary_names(), while leaving the already-correct installer behavior unchanged. The focused Windows simulation cleared the affected failures without adding new ones, and the Linux results were unchanged.

@oobabooga
oobabooga merged commit abb4c64 into unslothai:main Aug 26, 2026
22 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_sd_cpp_install.py: the non-safe_extractall tests cannot pass on Windows (fixtures hard-code the POSIX binary name)

3 participants