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 7, 2023
1 parent f9650ae commit 1c6774f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 14 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,14 @@ jobs:
run: |
cargo test -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
- if: ${{ !contains(matrix.host_os, 'windows') }}
run: |
mk/cargo.sh test -p rcgen-tests -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
- if: ${{ contains(matrix.host_os, 'windows') }}
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 +264,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 --workspace +${{ matrix.rust_channel }} test -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 1c6774f

Please sign in to comment.