Skip to content

Commit

Permalink
ci: remove client-server.py, cut over to rust tests
Browse files Browse the repository at this point in the history
This commit removes the existing `client-server.py` integration test and
updates CI to run the new Rust-based integration tests.
  • Loading branch information
cpu committed Oct 6, 2023
1 parent 0cc1602 commit f4761c0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 250 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ jobs:
run: cmake -S . -B build
- name: Build, debug configuration
run: cmake --build build --config Debug
- name: Client-server test, debug
run: python tests/client-server.py build/tests/Debug/client.exe build/tests/Debug/server.exe
env:
CLIENT_BINARY: build/tests/Debug/client.exe
SERVER_BINARY: build/tests/Debug/server.exe

test-windows-cmake-release:
name: Windows CMake, Release configuration
Expand All @@ -98,8 +99,9 @@ jobs:
run: cmake -S . -B build
- name: Build, release configuration
run: cmake --build build --config Release
- name: Client-server test, release
run: python tests/client-server.py build/tests/Release/client.exe build/tests/Release/server.exe
env:
CLIENT_BINARY: build/tests/Release/client.exe
SERVER_BINARY: build/tests/Release/server.exe

ensure-header-updated:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -149,6 +151,9 @@ jobs:
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@nightly

- name: Build client/server binaries
run: make target/client target/server

- name: cargo test (debug; all features; -Z minimal-versions)
run: cargo -Z minimal-versions test --all-features --locked

Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ endif

all: target/client target/server

test: all test-rust
./tests/client-server.py ./target/client ./target/server

test-rust:
test: all
${CARGO} test --locked

integration: all
${CARGO} test --locked -- --ignored

target:
mkdir -p $@

Expand Down Expand Up @@ -75,4 +75,4 @@ format-check:
! -wholename './src/rustls.h' | \
xargs clang-format --dry-run -Werror -i

.PHONY: all clean test format format-check
.PHONY: all clean test integration format format-check
5 changes: 5 additions & 0 deletions Makefile.Windows
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ test: all
$(call green_msg, Running 'cargo test')
cargo test --locked

integration: all
$(call green_msg, Running 'cargo test -- --ignored')
cargo test --locked -- --ignored

$(RUSTLS_LIB): src/lib.rs Cargo.toml
$(call green_msg, Building '$@')
RUSTFLAGS="--print native-static-libs" cargo build --release --locked
Expand All @@ -63,3 +67,4 @@ define link_EXE
@echo
endef

.PHONY: all clean test integration
241 changes: 0 additions & 241 deletions tests/client-server.py

This file was deleted.

0 comments on commit f4761c0

Please sign in to comment.