diff --git a/.github/workflows/libssl.yaml b/.github/workflows/libssl.yaml index 5a533ac..c1a10a2 100644 --- a/.github/workflows/libssl.yaml +++ b/.github/workflows/libssl.yaml @@ -55,8 +55,7 @@ jobs: run: sudo apt-get update && sudo apt-get install -y valgrind - name: Install build dependencies run: sudo apt-get update && sudo apt-get install -y openssl libssl3 libssl-dev lld - - run: export VALGRIND="valgrind -q" - - run: make test + - run: VALGRIND="valgrind -q" make test integration docs: name: Check for documentation errors diff --git a/rustls-libssl/tests/maybe-valgrind.sh b/rustls-libssl/tests/maybe-valgrind.sh new file mode 100755 index 0000000..e84838d --- /dev/null +++ b/rustls-libssl/tests/maybe-valgrind.sh @@ -0,0 +1,2 @@ +#!/bin/sh +exec $VALGRIND "$@" diff --git a/rustls-libssl/tests/runner.rs b/rustls-libssl/tests/runner.rs index e920677..24168eb 100644 --- a/rustls-libssl/tests/runner.rs +++ b/rustls-libssl/tests/runner.rs @@ -53,16 +53,16 @@ fn client() { wait_for_port(4443); - let openssl_insecure_output = Command::new("target/client") + let openssl_insecure_output = Command::new("tests/maybe-valgrind.sh") .env("LD_LIBRARY_PATH", "") - .args(&["localhost", "4443", "insecure"]) + .args(&["target/client", "localhost", "4443", "insecure"]) .stdout(Stdio::piped()) .output() .map(print_output) .unwrap(); - let rustls_insecure_output = Command::new("target/client") - .args(&["localhost", "4443", "insecure"]) + let rustls_insecure_output = Command::new("tests/maybe-valgrind.sh") + .args(&["target/client", "localhost", "4443", "insecure"]) .stdout(Stdio::piped()) .output() .map(print_output) @@ -70,16 +70,16 @@ fn client() { assert_eq!(openssl_insecure_output, rustls_insecure_output); - let openssl_secure_output = Command::new("target/client") + let openssl_secure_output = Command::new("tests/maybe-valgrind.sh") .env("LD_LIBRARY_PATH", "") - .args(&["localhost", "4443", "test-ca/rsa/ca.cert"]) + .args(&["target/client", "localhost", "4443", "test-ca/rsa/ca.cert"]) .stdout(Stdio::piped()) .output() .map(print_output) .unwrap(); - let rustls_secure_output = Command::new("target/client") - .args(&["localhost", "4443", "test-ca/rsa/ca.cert"]) + let rustls_secure_output = Command::new("tests/maybe-valgrind.sh") + .args(&["target/client", "localhost", "4443", "test-ca/rsa/ca.cert"]) .stdout(Stdio::piped()) .output() .map(print_output) @@ -91,14 +91,16 @@ fn client() { #[test] #[ignore] fn constants() { - let openssl_output = Command::new("target/constants") + let openssl_output = Command::new("tests/maybe-valgrind.sh") + .args(&["target/constants"]) .env("LD_LIBRARY_PATH", "") .stdout(Stdio::piped()) .output() .map(print_output) .unwrap(); - let rustls_output = Command::new("target/constants") + let rustls_output = Command::new("tests/maybe-valgrind.sh") + .args(&["target/constants"]) .stdout(Stdio::piped()) .output() .map(print_output) @@ -110,14 +112,16 @@ fn constants() { #[test] #[ignore] fn ciphers() { - let openssl_output = Command::new("target/ciphers") + let openssl_output = Command::new("tests/maybe-valgrind.sh") + .args(&["target/ciphers"]) .env("LD_LIBRARY_PATH", "") .stdout(Stdio::piped()) .output() .map(print_output) .unwrap(); - let rustls_output = Command::new("target/ciphers") + let rustls_output = Command::new("tests/maybe-valgrind.sh") + .args(&["target/ciphers"]) .stdout(Stdio::piped()) .output() .map(print_output)