Skip to content

Commit f8dac1d

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 f8dac1d

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

.github/workflows/test.yaml

+11-7
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
toolchain: ${{ matrix.rust }}
4242
- env:
4343
CARGO_UNSTABLE_HTTP_REGISTRY: true
44-
run: make CC=${{ matrix.cc }} PROFILE=release test
44+
run: make CC=${{ matrix.cc }} PROFILE=release test integration
4545

4646
valgrind:
4747
name: Valgrind
@@ -53,7 +53,7 @@ jobs:
5353
- name: Install valgrind
5454
run: sudo apt-get update && sudo apt-get install -y valgrind
5555
- run: export VALGRIND="valgrind -q"
56-
- run: make test
56+
- run: make test integration
5757

5858
test-windows:
5959
name: Windows
@@ -67,7 +67,7 @@ jobs:
6767
# Remove link.exe from non-MSVC packages that interferes with MSVC link
6868
- run: rm "C:\Program Files\Git\usr\bin\link.exe"
6969
- run: rm "C:\msys64\usr\bin\link.exe"
70-
- run: make -f Makefile.Windows
70+
- run: make -f Makefile.Windows test integration
7171

7272
test-windows-cmake-debug:
7373
name: Windows CMake, Debug configuration
@@ -82,9 +82,11 @@ jobs:
8282
run: cmake -S . -B build
8383
- name: Build, debug configuration
8484
run: cmake --build build --config Debug
85+
- name: Integration test, debug configuration
86+
run: cargo test --locked --test client_server client_server_integration -- --ignored --exact
8587
env:
86-
CLIENT_BINARY: build/tests/Debug/client.exe
87-
SERVER_BINARY: build/tests/Debug/server.exe
88+
CLIENT_BINARY: D:\a\rustls-ffi\rustls-ffi\build\tests\Debug\client.exe
89+
SERVER_BINARY: D:\a\rustls-ffi\rustls-ffi\build\tests\Debug\server.exe
8890

8991
test-windows-cmake-release:
9092
name: Windows CMake, Release configuration
@@ -99,9 +101,11 @@ jobs:
99101
run: cmake -S . -B build
100102
- name: Build, release configuration
101103
run: cmake --build build --config Release
104+
- name: Integration test, release configuration
105+
run: cargo test --locked --test client_server client_server_integration -- --ignored --exact
102106
env:
103-
CLIENT_BINARY: build/tests/Release/client.exe
104-
SERVER_BINARY: build/tests/Release/server.exe
107+
CLIENT_BINARY: D:\a\rustls-ffi\rustls-ffi\build\tests\Release\client.exe
108+
SERVER_BINARY: D:\a\rustls-ffi\rustls-ffi\build\tests\Release\server.exe
105109

106110
ensure-header-updated:
107111
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)