Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: maintain order in test vectors for languages with parallel tests #641

Merged
merged 4 commits into from
Aug 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,15 @@ module {:extern} TestWrappedMaterialProvidersMain {
// Runtime should define an extern to return the expected test execution directory.
method {:extern} GetTestVectorExecutionDirectory() returns (res: string)

// This MUST go before TestEncryptManifest
method {:test} TestGenerateEncryptManifest() {
// This is done to maintain order in systems that run tests in parallel
// such as Rust.
method {:test} RunManifestTests() {
ajewellamz marked this conversation as resolved.
Show resolved Hide resolved
TestGenerateEncryptManifest();
TestEncryptManifest();
TestDecryptManifest();
}

method TestGenerateEncryptManifest() {
var directory := GetTestVectorExecutionDirectory();
var result := CompleteVectors.WriteStuff(
EncryptManifest(
Expand All @@ -30,8 +37,7 @@ module {:extern} TestWrappedMaterialProvidersMain {
expect result.Success?;
}

// This MUST go before TestDecryptManifest
method {:test} TestEncryptManifest() {
method TestEncryptManifest() {
var directory := GetTestVectorExecutionDirectory();
var result := TestManifests.StartEncrypt(
Encrypt(
Expand All @@ -45,7 +51,7 @@ module {:extern} TestWrappedMaterialProvidersMain {
expect result.Success?;
}

method {:test} TestDecryptManifest() {
method TestDecryptManifest() {
var directory := GetTestVectorExecutionDirectory();
var result := TestManifests.StartDecrypt(
Decrypt(
Expand Down
Loading