From 21b99f892bcb478812cd40fe701a25540f23fd99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gonz=C3=A1lez?= Date: Thu, 15 Feb 2024 12:25:11 +0000 Subject: [PATCH] ci: Run the Parsec Service when testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the new addition of the Parsec Basic Client for the Parsec Provider Context, we now need to run the Parsec Service in order to create the client and use it for testing. Signed-off-by: Tomás González --- ci.sh | 19 ++++++++++++++++++- .../parsec-openssl-provider-test.Dockerfile | 4 ++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/ci.sh b/ci.sh index ad53359c..c588e288 100755 --- a/ci.sh +++ b/ci.sh @@ -8,8 +8,25 @@ set -ex echo "OpenSSL version being used:" openssl version +wait_for_service() { + while [ -z "$(pgrep parsec)" ]; do + sleep 1 + done + + sleep 5 + + # Check that Parsec successfully started and is running + pgrep parsec >/dev/null +} + +pushd /tmp/parsec +./target/debug/parsec -c e2e_tests/provider_cfg/mbed-crypto/config.toml & +popd + +wait_for_service + # Build parsec provider shared library -pushd parsec-openssl-provider-shared/ && +pushd parsec-openssl-provider-shared cargo build popd diff --git a/tests/docker_image/parsec-openssl-provider-test.Dockerfile b/tests/docker_image/parsec-openssl-provider-test.Dockerfile index 3e6da33a..34d4586d 100644 --- a/tests/docker_image/parsec-openssl-provider-test.Dockerfile +++ b/tests/docker_image/parsec-openssl-provider-test.Dockerfile @@ -28,3 +28,7 @@ ENV PATH="/root/.cargo/bin:/opt/rust/bin:${PATH}" # For running tests Parsec is configured with the socket in /tmp/ ENV PARSEC_SERVICE_ENDPOINT="unix:/tmp/parsec.sock" + +RUN git clone https://github.com/parallaxsecond/parsec.git --branch 1.3.0 \ + && cd parsec \ + && cargo build --features "mbed-crypto-provider,direct-authenticator"