aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts/test_cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripts/test_cli.py')
-rwxr-xr-xsrc/scripts/test_cli.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/scripts/test_cli.py b/src/scripts/test_cli.py
index 0a76d7465..2f5e5bba4 100755
--- a/src/scripts/test_cli.py
+++ b/src/scripts/test_cli.py
@@ -425,7 +425,7 @@ def cli_tls_ciphersuite_tests():
for policy in policies:
for version in versions:
- if policy in ['suiteb_128', 'suiteb_192', 'strict'] and version != 'tls1.2':
+ if version != 'tls1.2' and policy != 'all':
continue
output = test_cli("tls_ciphers", ["--version=" + version, "--policy=" + policy], None).split('\n')
@@ -648,8 +648,8 @@ def main(args=None):
setup_logging(options)
- if len(args) != 2:
- logging.error("Usage: ./cli_tests.py path_to_botan_cli")
+ if len(args) < 2:
+ logging.error("Usage: ./cli_tests.py path_to_botan_cli [test_regex]")
return 1
if not os.access(args[1], os.X_OK):
@@ -659,6 +659,10 @@ def main(args=None):
global CLI_PATH
CLI_PATH = args[1]
+ test_regex = None
+ if len(args) == 3:
+ test_regex = re.compile(args[2])
+
start_time = time.time()
test_fns = [
@@ -694,10 +698,16 @@ def main(args=None):
]
for fn in test_fns:
+ fn_name = fn.__name__
+
+ if test_regex is not None:
+ if test_regex.match(fn_name) is None:
+ continue
+
start = time.time()
fn()
end = time.time()
- logging.debug("Ran %s in %.02f", fn.__name__, end-start)
+ logging.debug("Ran %s in %.02f", fn_name, end-start)
end_time = time.time()