Skip to content

Commit 81d6766

Browse files
m
1 parent abfca22 commit 81d6766

File tree

4 files changed

+24
-5
lines changed

4 files changed

+24
-5
lines changed

codebuild/py312/decrypt_dafny_esdk_vectors_keyrings.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ phases:
2222
python: 3.12
2323
pre_build:
2424
commands:
25+
# Build and install MPL test vector Python package
26+
- tox -e install-mpl-runner
2527
# Fetch test vectors from Dafny ESDK's most recent run
2628
# (Assuming the first result is most recent; seems to be correct...)
2729
- |

codebuild/py312/decrypt_golden_manifest_with_keyrings.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ phases:
2121
# Download "golden manifest"
2222
- curl -L -o python-2.3.0.zip https://github.com/awslabs/aws-encryption-sdk-test-vectors/raw/master/vectors/awses-decrypt/python-2.3.0.zip
2323
- unzip python-2.3.0.zip -d python-2.3.0
24+
# Build and install MPL test vector Python package
25+
- tox -e install-mpl-runner
2426
build:
2527
commands:
2628
- pip install "tox < 4.0"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
aws-cryptography-internal-mpl-testvectors @ git+https://github.com/aws/aws-cryptographic-material-providers-library.git@python-main-with-dafny-code#subdirectory=TestVectorsAwsCryptographicMaterialProviders/runtimes/python
1+
aws-cryptographic-material-providers==1.7.2

test_vector_handlers/tox.ini

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,21 @@ envlist =
3838
[testenv:base-command]
3939
commands = pytest --basetemp={envtmpdir} -l --cov awses_test_vectors test/ --ignore test/mpl {posargs}
4040

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+
4156
[testenv]
4257
passenv =
4358
# Pass through AWS credentials
@@ -48,10 +63,10 @@ passenv =
4863
AWS_PROFILE
4964
sitepackages = False
5065
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+
; ..
5570
commands =
5671
awses_local: {[testenv:base-command]commands}
5772
full_decrypt_generate: awses-full-message-decrypt-generate {posargs}

0 commit comments

Comments
 (0)