Skip to content

Commit

Permalink
Use proper library name in test_all.
Browse files Browse the repository at this point in the history
  • Loading branch information
J08nY committed Aug 18, 2024
1 parent 343215f commit bd1531f
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion nix/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,27 @@
import subprocess as sp


def library_name(library):
match library:
case "cryptopp":
return "Crypto++"
case "boringssl":
return "BoringSSL"
case "openssl":
return "OpenSSL"
case "botan":
return "Botan"
case "ippcp":
return "IPPCP"
case "libressl":
return "LibreSSL"
case "nettle":
return "Nettle"
case "gcrypt":
return "libgcrypt"
case "mbedtls":
return "mbedTLS"

def base_options(library):
match library:
case "openssl" | "botan" | "boringssl" | "ippcp" | "libressl" | "gcrypt" | "nettle":
Expand Down Expand Up @@ -72,11 +93,12 @@ def build_library(library, version):
def test_library(library, test_suite, version):
opts = base_options(library)
opts.extend(globals()[f"{test_suite.replace('-', '_')}_options"](library))
lib_name = library_name(library)
command = ["./result/bin/ECTesterStandalone", "test",
f"-oyml:results/yml/{library}_{test_suite}_{version}.yml",
f"-otext:results/txt/{library}_{test_suite}_{version}.txt",
f"-oxml:results/xml/{library}_{test_suite}_{version}.xml",
"-q", *opts, test_suite, library]
"-q", *opts, test_suite, lib_name]
try:
result = sp.run(command, timeout=60, check=False)
print(f"run {library} {test_suite} {version} = {result.returncode}")
Expand Down

0 comments on commit bd1531f

Please sign in to comment.