@@ -38,6 +38,21 @@ envlist =
38
38
[testenv:base-command]
39
39
commands = pytest --basetemp ={envtmpdir} -l --cov awses_test_vectors test/ --ignore test/mpl {posargs}
40
40
41
+ [testenv:install-mpl-runner]
42
+ commands =
43
+ # Clone MPL repo to get test vectors runner source code and the Dafny version to use
44
+ ; git clone --recurse-submodules https://github.com/aws/aws-cryptographic-material-providers-library.git
45
+ # Download Dafny to build the test vector runner; get Dafny version from ESDK's project.properties file
46
+ ; /bin/bash -c "export dafnyVersion=$(grep '^dafnyVersion=' aws-cryptographic-material-providers-library/project.properties | cut -d '=' -f 2)"
47
+ ; /bin/bash -c "curl https://github.com/dafny-lang/dafny/releases/download/v$(grep '^dafnyVersion=' aws-cryptographic-material-providers-library/project.properties | cut -d '=' -f 2)/dafny-$(grep '^dafnyVersion=' aws-cryptographic-material-providers-library/project.properties | cut -d '=' -f 2)-x64-ubuntu-20.04.zip -L -o dafny.zip"
48
+ ; /bin/bash -c "unzip -qq dafny.zip && rm dafny.zip"
49
+ ; /bin/bash -c 'export PATH="$PWD/dafny:$PATH"'
50
+
51
+ # Build MPL test vector runner from source
52
+ make -C aws-cryptographic-material-providers-library/TestVectorsAwsCryptographicMaterialProviders/ transpile_python
53
+ # Install just the test vector runner, not its local MPL dependency
54
+ pip install aws-cryptographic-material-providers-library/TestVectorsAwsCryptographicMaterialProviders/runtimes/python --no-deps
55
+
41
56
[testenv]
42
57
passenv =
43
58
# Pass through AWS credentials
@@ -48,10 +63,10 @@ passenv =
48
63
AWS_PROFILE
49
64
sitepackages = False
50
65
deps =
51
- -rtest/requirements.txt
52
- # Install the MPL requirements if the `-mpl` suffix is present
53
- mpl: -rrequirements_mpl.txt
54
- ..
66
+ ; -rtest/requirements.txt
67
+ ; # Install the MPL requirements if the `-mpl` suffix is present
68
+ ; mpl: -rrequirements_mpl.txt
69
+ ; ..
55
70
commands =
56
71
awses_local: {[testenv:base-command]commands}
57
72
full_decrypt_generate: awses-full-message-decrypt-generate {posargs}
0 commit comments