I’m new to Windows driver development, so be gentle.
I would like to build and test a Windows PCIe (so KMDF) driver in an automated CI pipeline.
I would like to avoid (graphical) Visual Studio, as my team and I are primarily Linux developers and command-line tools seem to work best in CI automation. I’ve started with CMake + FindWDK + EWDK. Currently I can build a driver + inf on my local machine with that scheme, but it’s untested, so not sure if what I have is usable.
I checked in on the “Containerized WDK Build Environment” discussion and it seems like folks have varying degrees of success, but lean towards VMs instead of (Docker) containers for isolated builds. That would play well with a testing idea I have (below), too.
Ideally I’d like to test as much as I can in the CI pipeline, so tests may range from custom-written “can I write to register X on device Y and observe change Z” tests, to Microsoft-written tests like the DevFund tests in the HLK.
On Linux, I can setup a VM with PCIe passthrough and run driver tests inside the VM. This allows me to run different OSs/kernels but keep the physical test hardware identical. However, all MSDN articles I’ve found so far explicitly/implicitly say that a discrete non-virtualized system should be used for testing.
- If I attempt to setup VMs that run one-at-a-time, instead of building discrete systems for testing, am I going to run into trouble down the line with HLK?
- Should I stick with static tools (Code Analysis for Drivers, Static Driver Verifier) in the CI, and assume HLK will be run manually before release?
- Any critiques/gotchas/recommendations?
Thanks!