Add focused tests for native MSVC host and tool architecture checks
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
Research direction
Start with tools/test_check_msvc_native.py and tools/check_msvc_native.py, especially require_native and the existing environment and PE parsing tests. Run python3 -m unittest tools.test_check_msvc_native on a non-Windows host, then add focused mocked cases for each acceptance and rejection decision. Done means the tests distinguish each failure reason without SDK, PE executables, or compilation.
Written by the indexing model from the issue text.
Description
Coverage gap
require_native is the gate preventing emulated/wrong-machine execution from counting as native MSVC validation. It checks IsWow64Process2, the wavec/clang PE machine fields, and required SDK environment variables.
On master 0c32b946, the current tests cover an unavailable environment and PE header parsing, but do not independently exercise these acceptance/rejection decisions. On Linux, the unavailable-environment test exits at the os.name guard before reaching them. This is a test-coverage task, not a claim that the existing native check accepts emulation.
Scope
Difficulty: easy. Add table-driven unit tests around this small function using mocked Windows API results, PE inspection and environment variables. Use lightweight fakes or a narrow injectable helper if needed; avoid replacing global platform state in a way that makes pathlib choose an unsupported WindowsPath on Linux.
Cover:
- Native x64 and native ARM64 success with matching compiler/clang machines and SDK variables.
- Nonzero process-machine result (emulation) rejection.
- Host-machine mismatch rejection.
- Wrong wavec machine and wrong clang machine, checked independently.
- Missing/empty
LIBandINCLUDE, independently. - Windows API failure reported as a failure with useful cause.
Acceptance
python3 -m unittest tools.test_check_msvc_native runs the tests on a non-Windows development host with no real SDK/PE executables or subprocess compilation. Assertions distinguish the relevant rejection reason; do not merely assert that some exception occurred. Keep the production requirement for real native Windows execution unchanged.
This covers prerequisite decision logic only. Scenario timeout/report handling and package dependency inspection (#622) are separate tasks.
- Dominant language
- Rust
- Stars
- 53
- Forks
- 16
- Avg merge
- 4h 6m
- Merged PRs (30d)
- 44
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from wavefnd/Wave
-
bug ci good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
documentation good first issue needs testing
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
good first issue needs testing
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
good first issue needs testing
Difficulty 2/5 Half a day Newbie friendliness 84/100
-
build good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100