Guide
Testing on Windows
How do you prove a program works? Build it in WSL or on Windows, and let Windows itself run the tests against the same files.
What does the build check?
| Check | When |
|---|---|
| The program's imports fit its tier | Every program, after linking |
| Warnings are errors | Every file |
ui/ builds without floating point or system calls |
With the SDK's tests |
| Buttons match real WinUI within stated limits, pixel by pixel | With the SDK's tests |
How do you run the tests?
python tools/build.py # the SDK
python tools/app_build.py ../Hello # a program in its own repositoryWhat is a proof?
In WSL, prove.py builds the committed work, then Windows' own Python runs the tests against those programs on WSL's disk. It refuses uncommitted changes, because a proof is of a commit.
python3 tools/prove.py .How do you check one program's imports?
python tools/check_imports.py --tier 1 build/windows/hello-window.exeIt reads the finished file as Windows' loader does. Besides functions outside the tier, it refuses imports by ordinal, delay-loaded DLLs, bound imports, thread-local storage, and a DLL that is loaded for nothing.
Up to dateDescribes
tools/prove.py, tools/build.py, tools/check_imports.py, tests/test_seed.py, tests/test_ui.pyEdit this pagePublished from b1dc570