Skip to content

Commit a1bf065

Browse files
author
Joe Ellis
committed
Add support for testing Unix peer credentials authenticator
Certain features require a nightly build of the Rust toolchain. For example, the peer credentials authenticator currently (Sep 2020) requires the nightly Rust compiler, because the `peer_cred` functionality it depends on is only available in the nightly builds. Nonetheless, we still want to be able to test this functionality. This commit adds a section to the CI script to allow us to test these sorts of features with the nightly Rust toolchain. Signed-off-by: Joe Ellis <[email protected]>
1 parent 822feb4 commit a1bf065

File tree

5 files changed

+24
-0
lines changed

5 files changed

+24
-0
lines changed

ci.sh

+8
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,14 @@ fi
122122
echo "Unit, doc and integration tests"
123123
RUST_BACKTRACE=1 cargo test $FEATURES
124124

125+
# Run tests for Parsec features that require a nightly version of the compiler
126+
# to function. For example: Unix peer credentials authenticator is currently
127+
# only functional if we use the nightly compiler, since it depends on the
128+
# `peer_cred` function.
129+
# TODO: change this list as features trickle into the stable branch.
130+
echo "Unit testing peer credentials authenticator"
131+
RUST_BACKTRACE=1 cargo +nightly test --features=peer-credentials-authenticator
132+
125133
# Removing any mappings left over from integration tests
126134
rm -rf mappings/
127135

e2e_tests/provider_cfg/all/Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,8 @@ RUN softhsm2-util --init-token --slot 0 --label "Parsec Tests" --pin 123456 --so
4646

4747
# Install Rust toolchain
4848
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
49+
50+
# Install Rust nightly.
51+
RUN rustup install nightly
52+
4953
ENV PATH="/root/.cargo/bin:${PATH}"

e2e_tests/provider_cfg/mbed-crypto/Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,8 @@ RUN cd mbed-crypto-mbedcrypto-2.0.0 \
1515

1616
# Install Rust toolchain
1717
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
18+
19+
# Install Rust nightly.
20+
RUN rustup install nightly
21+
1822
ENV PATH="/root/.cargo/bin:${PATH}"

e2e_tests/provider_cfg/pkcs11/Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ RUN cd SoftHSMv2-2.5.0 \
2020

2121
# Install Rust toolchain
2222
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
23+
24+
# Install Rust nightly.
25+
RUN rustup install nightly
26+
2327
ENV PATH="/root/.cargo/bin:${PATH}"
2428

2529
# Create a new token in a new slot. The slot number assigned will be random

e2e_tests/provider_cfg/tpm/Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,8 @@ RUN cd tpm2-tools \
2020

2121
# Install Rust toolchain
2222
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
23+
24+
# Install Rust nightly.
25+
RUN rustup install nightly
26+
2327
ENV PATH="/root/.cargo/bin:${PATH}"

0 commit comments

Comments
 (0)