Well, replying to myself:
I tried building the unit tests using cmocka for Windows
(cross-compiling using mingw-w64 with locally built cmocka).
Unfortunately, none of the tests could be built out of the box because
of missing dependencies, so I guess no one is running these tests on
Windows.
Good news is that I could get provider_testdriver to build and run on
Windows with minor tweaks and a test for this patch could be easily
written too.
I can follow up with a test patch, but wonder whether it's worth
spending time on if no one else is building these tests for Windows.
I have a cmake build file for OpenVPN that actually builds part of the
unit tests ("test_packet_id" "test_crypto" "test_ncp" "test_auth_token"
"test_misc" "test_buffer" "test_provider" "test_pkt") and run them in
the Github actions pipeline. But the cmake stuff is more "work in
progress" and the general consensus was to stick with the autoconf
approach.
I looked into building the test binaries as part of the normal MSVC
build but gave up on trying to figure out how to deal with MSVC and
their solutions, especially since you can nowadays just point it at a
CmakeLists.txt and it will pick that up just fine.
If you want to take a look:
Cmake build file:
https://github.com/schwabe/openvpn/blob/bloom/CMakeLists.txt
Running tests as part of GHA:
https://github.com/schwabe/openvpn/blob/bloom/.github/workflows/build.yaml#L561
Arne
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel