Tests and CI¶
The tests run in Wine (with 16-bit support, as in the 32-bit or WoW64 builds):
BIN=~/llvm-build/bin SYSROOT=$PWD/sysroot LD=/path/to/jwlink \
DOS_SDK=~/dos-sdk sh tests/run-tests.sh
They build each test for the small, medium, compact and large models at
-O0, -Os and -O2 (MODELS= and OPTS= pick others):
tests/win16/hello.c:main, arguments, the heap, files and the clock.tests/win16/api.c:WinMainand KERNEL and USER calls through<windows.h>.tests/win16/sizes.c: the size of each structure in the headers.tests/win16/windowsx.c: every message cracker splits a message and its forwarder packs it back the same way, with and withoutSTRICT, and the control macros compile.tests/win16/testdll.cwithtests/win16/dllapp.c: a DLL withLibMain, exports and static data, called from a program, and its use of locals on the caller's stack, through far pointers and near ones (handed to the C library too).tests/win16/cxxdll.cppwithtests/win16/cxxdllapp.c: a C++ DLL with objects, strings and vectors on its stack.tests/win16/res.rcwithtests/win16/res.c: resources compiled byllvm-rc -win16: strings, a menu, accelerators, a dialog, an icon, raw data and version information.- dos-sdk's
tests/libc/nearfar.c,tests/libc/random.candtests/cxx/except.cpp, built for Windows. tests/win16/gui.c: a window, its message loop, painting and a timer. It needs a display:DISPLAY, orxvfb-runonPATH.NO_GUI=1skips it.
CI¶
dos-sdk's toolchain workflow (.github/workflows/toolchain.yml) checks
out this repository at main, or at the win16_sdk_ref it is given, and
builds the toolchain package with every sysroot. Its smoke test builds a
program for each Windows version, checks it with ne-check.py and runs it
in Wine.