diff options
author | Jack Lloyd <[email protected]> | 2018-04-05 11:21:16 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-04-05 11:21:16 -0400 |
commit | 0fe2273728ca637ff0d57cd80274bf7c541d1dbd (patch) | |
tree | b9033dfa756688980d68d08a7c271988a65843d5 /src/scripts/test_cli.py | |
parent | e137dcb349a4c2e7fda71ed539361bbdefedebd1 (diff) |
Fix bug in CLI, and fix bug in CLI tests
The tests were detecting the problem and failing, but just returned
zero in any case so CI did not fail.
Also fix some CLI bugs that caused failures if OpenSSL was enabled.
Diffstat (limited to 'src/scripts/test_cli.py')
-rwxr-xr-x | src/scripts/test_cli.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/scripts/test_cli.py b/src/scripts/test_cli.py index 329a51295..ea5808e7c 100755 --- a/src/scripts/test_cli.py +++ b/src/scripts/test_cli.py @@ -169,7 +169,7 @@ wGf/MGbgPebBLmozAANENw== valid_sig = "xd3J9jtTBWFWA9ceVGYpmEB0A1DmOoxHRF7FpYW2ng/GYEH/HYljIfYzu/L5iTK6XfVePxeMr6ubCYCD9vFGIw==" - test_cli("sign", "%s %s" % (priv_key, priv_key), valid_sig) + test_cli("sign", "--provider=base %s %s" % (priv_key, priv_key), valid_sig) test_cli("verify", [pub_key, priv_key, '-'], "Signature is valid", valid_sig) @@ -290,7 +290,7 @@ MCACAQUTBnN0cmluZzEGAQH/AgFjBAUAAAAAAAMEAP///w== def cli_speed_tests(): output = test_cli("speed", ["--msec=1", "--buf-size=64,512", "AES-128"], None).split('\n') - if len(output) != 4: + if len(output) % 4 != 0: logging.error("Unexpected number of lines for AES-128 speed test") # pylint: disable=line-too-long @@ -370,6 +370,8 @@ def main(args=None): print("Ran %d tests with %d failures in %.02f seconds" % ( TESTS_RUN, TESTS_FAILED, end_time - start_time)) + if TESTS_FAILED > 0: + return 1 return 0 if __name__ == '__main__': |