Run bogo against both ring and aws-lc-rs providers

This commit is contained in:
Joseph Birr-Pixton 2023-11-16 09:42:53 +00:00 committed by Joe Birr-Pixton
parent 3d90b0b9e1
commit c8c46bea4d
3 changed files with 27 additions and 5 deletions

View File

@ -7,4 +7,9 @@ cargo llvm-cov clean --workspace
cargo build --locked --all-targets --all-features
cargo test --locked --all-features
## bogo
cargo test --locked --all-features run_bogo_tests_ring -- --ignored
cargo test --locked --all-features run_bogo_tests_aws_lc_rs -- --ignored
cargo llvm-cov report "$@"

View File

@ -7,10 +7,10 @@ set -xe
case ${BOGO_SHIM_PROVIDER:-ring} in
ring)
cargo build --example bogo_shim
cargo build -p rustls --example bogo_shim
;;
aws-lc-rs)
cargo build --example bogo_shim --no-default-features --features aws_lc_rs,tls12,logging
cargo build -p rustls --example bogo_shim --no-default-features --features aws_lc_rs,tls12,logging
;;
existing)
;;

View File

@ -3,16 +3,33 @@
// and run.
#[test]
#[cfg(coverage)]
fn run_bogo_tests() {
#[ignore]
fn run_bogo_tests_ring() {
use std::process::Command;
let rc = Command::new("./runme")
.current_dir("../bogo")
.env("BOGO_SHIM_PROVIDER", "ring")
.spawn()
.expect("cannot run bogo/runme")
.wait()
.expect("cannot wait for bogo");
assert!(rc.success(), "bogo exited non-zero");
assert!(rc.success(), "bogo (ring) exited non-zero");
}
#[test]
#[ignore]
fn run_bogo_tests_aws_lc_rs() {
use std::process::Command;
let rc = Command::new("./runme")
.current_dir("../bogo")
.env("BOGO_SHIM_PROVIDER", "aws-lc-rs")
.spawn()
.expect("cannot run bogo/runme")
.wait()
.expect("cannot wait for bogo");
assert!(rc.success(), "bogo (aws-lc-rs) exited non-zero");
}