diff --git a/.github/workflows/unittest_uwp.yml b/.github/workflows/unittest_uwp.yml index d37763c0..ef0e92db 100644 --- a/.github/workflows/unittest_uwp.yml +++ b/.github/workflows/unittest_uwp.yml @@ -10,11 +10,17 @@ jobs: steps: - uses: actions/checkout@v1 - uses: seanmiddleditch/gha-setup-vsdevenv@master + - uses: seanmiddleditch/gha-setup-ninja@master - run: | mkdir build cd build - cmake -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0" -DCMAKE_CXX_COMPILER=cl.exe -DUSE_TEST=1 -DUSE_ZLIB=0 .. - - run: cmake --build build + cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0" -DCMAKE_CXX_COMPILER=cl.exe -DCMAKE_C_COMPILER=cl.exe -DUSE_TEST=1 -DUSE_ZLIB=0 .. + - run: | + cd build + ninja + - run: | + cd build + ninja test # # Windows with OpenSSL is working but disabled as it takes 13 minutes (10 for openssl) to build with vcpkg diff --git a/.github/workflows/unittest_windows.yml b/.github/workflows/unittest_windows.yml index 4fe63e6c..71f64f95 100644 --- a/.github/workflows/unittest_windows.yml +++ b/.github/workflows/unittest_windows.yml @@ -10,11 +10,17 @@ jobs: steps: - uses: actions/checkout@v1 - uses: seanmiddleditch/gha-setup-vsdevenv@master + - uses: seanmiddleditch/gha-setup-ninja@master - run: | mkdir build cd build - cmake -DCMAKE_CXX_COMPILER=cl.exe -DUSE_WS=1 -DUSE_TEST=1 -DUSE_ZLIB=0 .. - - run: cmake --build build + cmake -GNinja -DCMAKE_CXX_COMPILER=cl.exe -DCMAKE_C_COMPILER=cl.exe -DUSE_WS=1 -DUSE_TEST=1 -DUSE_ZLIB=0 .. + - run: | + cd build + ninja + - run: | + cd build + ninja test #- run: ../build/test/ixwebsocket_unittest.exe # working-directory: test diff --git a/README.md b/README.md index b1b1bba5..ab5eeee3 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,10 @@ To check the performance of a websocket library, you can look at the [autoroute] | UWP | Disabled | None | [![Build2][6]][0] | | Linux | OpenSSL | Address Sanitizer | [![Build2][7]][0] | +* ASAN fails on Linux because of a known problem, we need a +* Some tests are disabled on Windows/UWP because of a pathing problem +* TLS and ZLIB are disabled on Windows/UWP because enabling make the CI run takes a lot of time, for setting up vcpkg. + [0]: https://github.com/machinezone/IXWebSocket [1]: https://github.com/machinezone/IXWebSocket/workflows/linux/badge.svg [2]: https://github.com/machinezone/IXWebSocket/workflows/mac_tsan_sectransport/badge.svg diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 7c98282a..661aebb1 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -17,14 +17,11 @@ set (TEST_TARGET_NAMES IXWebSocketTestConnectionDisconnection IXUrlParserTest IXHttpClientTest - IXHttpServerTest IXUnityBuildsTest IXHttpTest IXDNSLookupTest IXWebSocketSubProtocolTest - IXWebSocketChatTest # IXWebSocketBroadcastTest ## FIXME was depending on cobra / take a broadcast server from ws - IXWebSocketPerMessageDeflateCompressorTest IXStrCaseCompareTest ) @@ -33,6 +30,17 @@ set (TEST_TARGET_NAMES if (UNIX) list(APPEND TEST_TARGET_NAMES IXWebSocketCloseTest + + # Fail on Windows in CI probably because the pathing is wrong and + # some resource files cannot be found + IXHttpServerTest + IXWebSocketChatTest + ) +endif() + +if (USE_ZLIB) + list(APPEND TEST_TARGET_NAMES + IXWebSocketPerMessageDeflateCompressorTest ) endif() diff --git a/test/IXStrCaseCompareTest.cpp b/test/IXStrCaseCompareTest.cpp index 2db994a2..8a4408d4 100644 --- a/test/IXStrCaseCompareTest.cpp +++ b/test/IXStrCaseCompareTest.cpp @@ -29,6 +29,7 @@ namespace ix // Comparison should be case insensitive REQUIRE(httpHeaders["Foo"] == "foo"); + REQUIRE(httpHeaders["Foo"] != "bar"); } SECTION("2") @@ -39,7 +40,7 @@ namespace ix headers["Upgrade"] = "webSocket"; - REQUIRE(CaseInsensitiveLess::cmp(headers["upgrade"], "WebSocket") == 0); + REQUIRE(!CaseInsensitiveLess::cmp(headers["upGRADE"], "webSocket")); } }