Skip to content

Commit e212c01

Browse files
committed
CI: restore running integration tests in CI
When we cut over to the Rust based integration tests we neglected to update the `make test` call-sites to also run `make integration`. The `test` PHONY target doesn't run the `--ignored` cargo tests that include the integration component. For the Windows makefile (not CMake) we must also update a test invocation to specify that cert verification should be skipped, otherwise the test just generates usage help. For the CMake windows targets, a few changes are needed: 1. We need to run the integration tests separately from the `TEST_COMMAND` - the test binaries are built by this process, and so we can't rely on them to exist for the integration test to use until afterwards 2. We need to run only the client/server tests. The CMake builds disagree with the non-CMake builds about the required linker parts for the `verify_static_libs` integration test.
1 parent 0501b98 commit e212c01

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

.github/workflows/test.yaml

+12-5
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
- env:
4343
CARGO_UNSTABLE_HTTP_REGISTRY: true
4444
run: make CC=${{ matrix.cc }} PROFILE=release test
45+
- run: make CC=${{ matrix.cc }} PROFILE=release test integration
4546

4647
valgrind:
4748
name: Valgrind
@@ -54,6 +55,7 @@ jobs:
5455
run: sudo apt-get update && sudo apt-get install -y valgrind
5556
- run: export VALGRIND="valgrind -q"
5657
- run: make test
58+
- run: make integration
5759

5860
test-windows:
5961
name: Windows
@@ -67,7 +69,8 @@ jobs:
6769
# Remove link.exe from non-MSVC packages that interferes with MSVC link
6870
- run: rm "C:\Program Files\Git\usr\bin\link.exe"
6971
- run: rm "C:\msys64\usr\bin\link.exe"
70-
- run: make -f Makefile.Windows
72+
- run: make -f Makefile.Windows test
73+
- run: make -f Makefile.Windows integration
7174

7275
test-windows-cmake-debug:
7376
name: Windows CMake, Debug configuration
@@ -82,9 +85,11 @@ jobs:
8285
run: cmake -S . -B build
8386
- name: Build, debug configuration
8487
run: cmake --build build --config Debug
88+
- name: Integration test, debug configuration
89+
run: cargo test --locked --test client_server client_server_integration -- --ignored --exact
8590
env:
86-
CLIENT_BINARY: build/tests/Debug/client.exe
87-
SERVER_BINARY: build/tests/Debug/server.exe
91+
CLIENT_BINARY: D:\a\rustls-ffi\rustls-ffi\build\tests\Debug\client.exe
92+
SERVER_BINARY: D:\a\rustls-ffi\rustls-ffi\build\tests\Debug\server.exe
8893

8994
test-windows-cmake-release:
9095
name: Windows CMake, Release configuration
@@ -99,9 +104,11 @@ jobs:
99104
run: cmake -S . -B build
100105
- name: Build, release configuration
101106
run: cmake --build build --config Release
107+
- name: Integration test, release configuration
108+
run: cargo test --locked --test client_server client_server_integration -- --ignored --exact
102109
env:
103-
CLIENT_BINARY: build/tests/Release/client.exe
104-
SERVER_BINARY: build/tests/Release/server.exe
110+
CLIENT_BINARY: D:\a\rustls-ffi\rustls-ffi\build\tests\Release\client.exe
111+
SERVER_BINARY: D:\a\rustls-ffi\rustls-ffi\build\tests\Release\server.exe
105112

106113
ensure-header-updated:
107114
runs-on: ubuntu-latest

Makefile.Windows

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ all: $(RUSTLS_LIB) target/client.exe target/server.exe
3636

3737
test: all
3838
$(call green_msg, getting 'https://httpbin.org/headers' ...)
39-
target/client.exe httpbin.org 443 /headers
39+
NO_CHECK_CERTIFICATE=1 target/client.exe httpbin.org 443 /headers
4040
$(call green_msg, Running 'cargo test')
4141
cargo test --locked
4242

0 commit comments

Comments
 (0)