Skip to content

Commit

Permalink
Add support for testing Unix peer credentials authenticator
Browse files Browse the repository at this point in the history
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 <joe.ellis@arm.com>
  • Loading branch information
Joe Ellis committed Sep 10, 2020
1 parent 822feb4 commit a1bf065
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@ fi
echo "Unit, doc and integration tests"
RUST_BACKTRACE=1 cargo test $FEATURES

# Run tests for Parsec features that require a nightly version of the compiler
# to function. For example: Unix peer credentials authenticator is currently
# only functional if we use the nightly compiler, since it depends on the
# `peer_cred` function.
# TODO: change this list as features trickle into the stable branch.
echo "Unit testing peer credentials authenticator"
RUST_BACKTRACE=1 cargo +nightly test --features=peer-credentials-authenticator

# Removing any mappings left over from integration tests
rm -rf mappings/

Expand Down
4 changes: 4 additions & 0 deletions e2e_tests/provider_cfg/all/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,8 @@ RUN softhsm2-util --init-token --slot 0 --label "Parsec Tests" --pin 123456 --so

# Install Rust toolchain
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y

# Install Rust nightly.
RUN rustup install nightly

ENV PATH="/root/.cargo/bin:${PATH}"
4 changes: 4 additions & 0 deletions e2e_tests/provider_cfg/mbed-crypto/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@ RUN cd mbed-crypto-mbedcrypto-2.0.0 \

# Install Rust toolchain
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y

# Install Rust nightly.
RUN rustup install nightly

ENV PATH="/root/.cargo/bin:${PATH}"
4 changes: 4 additions & 0 deletions e2e_tests/provider_cfg/pkcs11/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ RUN cd SoftHSMv2-2.5.0 \

# Install Rust toolchain
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y

# Install Rust nightly.
RUN rustup install nightly

ENV PATH="/root/.cargo/bin:${PATH}"

# Create a new token in a new slot. The slot number assigned will be random
Expand Down
4 changes: 4 additions & 0 deletions e2e_tests/provider_cfg/tpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ RUN cd tpm2-tools \

# Install Rust toolchain
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y

# Install Rust nightly.
RUN rustup install nightly

ENV PATH="/root/.cargo/bin:${PATH}"

0 comments on commit a1bf065

Please sign in to comment.