Skip to content

Commit 4edc168

Browse files
committed
Move end to end tests to own crate
This commit moves the PARSEC end-to-end tests into their own crate and refactors the test script along with it. Signed-off-by: Ionut Mihalcea <ionut.mihalcea@arm.com>
1 parent f190fb3 commit 4edc168

32 files changed

+121
-87
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,38 @@ jobs:
77
name: Various tests targeting a Parsec image with all providers included
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v1
11-
- name: Build the container
12-
run: docker build -t all-providers tests/all_providers
13-
- name: Run the container to execute the test script
14-
run: docker run -v $(pwd):/tmp/parsec -w /tmp/parsec all-providers /tmp/parsec/tests/ci.sh all
10+
- uses: actions/checkout@v1
11+
- name: Build the container
12+
run: docker build -t all-providers e2e_tests/provider_cfg/all
13+
- name: Run the container to execute the test script
14+
run: docker run -v $(pwd):/tmp/parsec -w /tmp/parsec all-providers /tmp/parsec/tests/ci.sh all
1515

1616
mbed-crypto-provider:
1717
name: Integration tests using Mbed Crypto provider
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v1
21-
- name: Build the container
22-
run: docker build -t mbed-crypto-provider tests/per_provider/provider_cfg/mbed-crypto
23-
- name: Run the container to execute the test script
24-
run: docker run -v $(pwd):/tmp/parsec -w /tmp/parsec mbed-crypto-provider /tmp/parsec/tests/ci.sh mbed-crypto
20+
- uses: actions/checkout@v1
21+
- name: Build the container
22+
run: docker build -t mbed-crypto-provider e2e_tests/provider_cfg/mbed-crypto
23+
- name: Run the container to execute the test script
24+
run: docker run -v $(pwd):/tmp/parsec -w /tmp/parsec mbed-crypto-provider /tmp/parsec/tests/ci.sh mbed-crypto
2525

2626
pkcs11-provider:
2727
name: Integration tests using PKCS 11 provider
2828
runs-on: ubuntu-latest
2929
steps:
30-
- uses: actions/checkout@v1
31-
- name: Build the container
32-
run: docker build -t pkcs11-provider tests/per_provider/provider_cfg/pkcs11
33-
- name: Run the container to execute the test script
34-
run: docker run -v $(pwd):/tmp/parsec -w /tmp/parsec pkcs11-provider /tmp/parsec/tests/ci.sh pkcs11
30+
- uses: actions/checkout@v1
31+
- name: Build the container
32+
run: docker build -t pkcs11-provider e2e_tests/provider_cfg/pkcs11
33+
- name: Run the container to execute the test script
34+
run: docker run -v $(pwd):/tmp/parsec -w /tmp/parsec pkcs11-provider /tmp/parsec/tests/ci.sh pkcs11
3535

3636
tpm-provider:
3737
name: Integration tests using TPM provider
3838
runs-on: ubuntu-latest
3939
steps:
40-
- uses: actions/checkout@v1
41-
- name: Build the container
42-
run: docker build -t tpm-provider tests/per_provider/provider_cfg/tpm
43-
- name: Run the container to execute the test script
44-
run: docker run -v $(pwd):/tmp/parsec -w /tmp/parsec tpm-provider /tmp/parsec/tests/ci.sh tpm
40+
- uses: actions/checkout@v1
41+
- name: Build the container
42+
run: docker build -t tpm-provider e2e_tests/provider_cfg/tpm
43+
- name: Run the container to execute the test script
44+
run: docker run -v $(pwd):/tmp/parsec -w /tmp/parsec tpm-provider /tmp/parsec/tests/ci.sh tpm

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ services:
77
jobs:
88
include:
99
- name: "Integration tests using Mbed Crypto provider"
10-
env: DOCKER_IMAGE_NAME=mbed-crypto-provider DOCKER_IMAGE_PATH=tests/per_provider/provider_cfg/mbed-crypto SCRIPT="tests/ci.sh mbed-crypto"
10+
env: DOCKER_IMAGE_NAME=mbed-crypto-provider DOCKER_IMAGE_PATH=e2e_tests/provider_cfg/mbed-crypto SCRIPT="tests/ci.sh mbed-crypto"
1111
- name: "Integration tests using PKCS 11 provider"
12-
env: DOCKER_IMAGE_NAME=pkcs11-provider DOCKER_IMAGE_PATH=tests/per_provider/provider_cfg/pkcs11 SCRIPT="tests/ci.sh pkcs11"
12+
env: DOCKER_IMAGE_NAME=pkcs11-provider DOCKER_IMAGE_PATH=e2e_tests/provider_cfg/pkcs11 SCRIPT="tests/ci.sh pkcs11"
1313
# PKCS11 tests are failing because of unidentified issues.
1414
# See https://github.com/parallaxsecond/parsec/issues/116
1515
allow_failures:
16-
- env: DOCKER_IMAGE_NAME=mbed-crypto-provider DOCKER_IMAGE_PATH=tests/per_provider/provider_cfg/mbed-crypto SCRIPT="tests/ci.sh mbed-crypto"
17-
- env: DOCKER_IMAGE_NAME=pkcs11-provider DOCKER_IMAGE_PATH=tests/per_provider/provider_cfg/pkcs11 SCRIPT="tests/ci.sh pkcs11"
16+
- env: DOCKER_IMAGE_NAME=mbed-crypto-provider DOCKER_IMAGE_PATH=e2e_tests/provider_cfg/mbed-crypto SCRIPT="tests/ci.sh mbed-crypto"
17+
- env: DOCKER_IMAGE_NAME=pkcs11-provider DOCKER_IMAGE_PATH=e2e_tests/provider_cfg/pkcs11 SCRIPT="tests/ci.sh pkcs11"
1818
script:
1919
- docker build -t $DOCKER_IMAGE_NAME $DOCKER_IMAGE_PATH
2020
- docker run -v $(pwd):/tmp/parsec -w /tmp/parsec $DOCKER_IMAGE_NAME /tmp/parsec/$SCRIPT

e2e_tests/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
target
2+
Cargo.lock

e2e_tests/Cargo.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This crate should NOT be upstreamed to crates.io; it is only intended for
2+
# PARSEC testing purposes (both locally and on CI)
3+
[package]
4+
name = "e2e_tests"
5+
version = "0.1.0"
6+
authors = ["Anton Antonov <anton.antonov@arm.com>",
7+
"Paul Howard <paul.howard@arm.com>",
8+
"Ionut Mihalcea <ionut.mihalcea@arm.com>",
9+
"Hugues de Valon <hugues.devalon@arm.com>"]
10+
description = "End to end testing framework for PARSEC"
11+
license = "Apache-2.0"
12+
edition = "2018"
13+
publish = false
14+
15+
[dependencies]
16+
num_cpus = "1.13.0"
17+
picky-asn1-der = "0.2.2"
18+
picky-asn1 = "0.2.1"
19+
serde = { version = "1.0", features = ["derive"] }
20+
sha2 = "0.8.1"
21+
parsec-client = { version = "0.2.0", features = ["testing"] }
22+
log = "0.4.8"
23+
rand = "0.7.3"
24+
25+
[dev-dependencies]
26+
env_logger = "0.7.1"
27+
uuid = "0.7.4"

0 commit comments

Comments
 (0)