diff options
author | Jack Lloyd <[email protected]> | 2017-08-27 06:16:44 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-08-29 07:35:43 -0400 |
commit | 8ba4f57d30d9e12bdb8d37b0b37e5e54f8854486 (patch) | |
tree | d833f8b83dd510579ab24b6a4f9d1a87fd266016 /src/scripts | |
parent | d320806891db43f16d3bf5577f6492f5269adf9f (diff) |
Skip PKCS11 tests if SoftHSM library isn't there
Diffstat (limited to 'src/scripts')
-rwxr-xr-x | src/scripts/ci_build.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/scripts/ci_build.py b/src/scripts/ci_build.py index 86f4d23a4..c9687bf1a 100755 --- a/src/scripts/ci_build.py +++ b/src/scripts/ci_build.py @@ -149,8 +149,11 @@ def determine_flags(target, target_os, target_cc, cc_bin, use_ccache, root_dir): if target == 'coverage': flags += ['--with-tpm'] - test_cmd += ['--run-long-tests', '--run-online-tests', - '--pkcs11-lib=/tmp/softhsm/lib/softhsm/libsofthsm2.so'] + test_cmd += ['--run-long-tests', '--run-online-tests'] + + softhsm_lib = '/tmp/softhsm/lib/softhsm/libsofthsm2.so' + if os.access(softhsm_lib, os.R_OK): + test_cmd += ['--pkcs11-lib=%s' % (softhsm_lib)] if target_os == 'osx': # Test Boost on OS X @@ -188,7 +191,8 @@ def run_cmd(cmd, root_dir): print("Ran for %f seconds" % (time_taken)) if proc.returncode != 0: - raise Exception("Command failed with error code %d" % (proc.returncode)) + print("Command failed with error code %d" % (proc.returncode)) + sys.exit(proc.returncode) def setup_option_parser(): """ |