Skip to content

Commit

Permalink
Move rcgen-based tests to their own crate.
Browse files Browse the repository at this point in the history
Remove the `rcgen` dev-dependency from the webpki crate.
  • Loading branch information
briansmith committed Oct 8, 2023
1 parent 764cc60 commit ba29bbf
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 14 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,16 @@ jobs:
run: |
cargo test -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
# rcgen-based tests require Rust 1.67.
- if: ${{ !contains(matrix.host_os, 'windows') && !contains(matrix.rust_channel, '1.61.0') }}
run: |
mk/cargo.sh test -p rcgen-tests -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
# rcgen-based tests require Rust 1.67.
- if: ${{ contains(matrix.host_os, 'windows') && !contains(matrix.rust_channel, '1.61.0') }}
run: |
cargo test -vv -p rcgen-tests --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
coverage:
runs-on: ${{ matrix.host_os }}

Expand Down Expand Up @@ -256,7 +266,7 @@ jobs:

- if: ${{ !contains(matrix.host_os, 'windows') }}
run: |
RING_COVERAGE=1 mk/cargo.sh +${{ matrix.rust_channel }} test -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
RING_COVERAGE=1 mk/cargo.sh +${{ matrix.rust_channel }} test --workspace -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
- uses: briansmith/codecov-codecov-action@v1
with:
Expand Down
7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ untrusted = "0.9"

[dev-dependencies]
base64 = "0.9.1"
rcgen = { version = "0.11.3", default-features = false }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

Expand All @@ -80,3 +79,9 @@ rpath = false
lto = true
debug-assertions = false
codegen-units = 1

[workspace]
members = [
# Intentionally not a default member.
"rcgen-tests",
]
9 changes: 9 additions & 0 deletions rcgen-tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
edition = "2018"
name = "rcgen-tests"
publish = false
version = "0.10.0"

[dev-dependencies]
rcgen = { version = "0.11.3", default-features = false }
webpki = { path = "../", default-features = false }
12 changes: 0 additions & 12 deletions tests/dos.rs → rcgen-tests/tests/dos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,6 @@
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

// XXX: rcgen can only build on archs that *ring* 0.16 supports.
#![cfg(all(
not(all(target_arch = "aarch64", target_os = "windows")),
any(
target_arch = "aarch64",
target_arch = "arm",
target_arch = "wasm32",
target_arch = "x86",
target_arch = "x86_64"
)
))]
#![cfg(feature = "alloc")]
#![no_std]

extern crate alloc;
Expand Down

0 comments on commit ba29bbf

Please sign in to comment.