diff options
author | René Meusel <[email protected]> | 2021-10-20 11:23:20 +0530 |
---|---|---|
committer | René Meusel <[email protected]> | 2021-10-20 11:56:07 +0530 |
commit | 7b1c73a0d899cb2135028d725eeaf4caebfe8ee2 (patch) | |
tree | d8ca8d3fa91d9736766ed7d03206d9708eba428e /src/scripts/ci_build.py | |
parent | 3ccf4f6bb3bf20493894ab115ad8ac3f47bc3c64 (diff) |
allow disabling tests in ci_build.py
Diffstat (limited to 'src/scripts/ci_build.py')
-rwxr-xr-x | src/scripts/ci_build.py | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/scripts/ci_build.py b/src/scripts/ci_build.py index 56f62b13b..9e99f2d1a 100755 --- a/src/scripts/ci_build.py +++ b/src/scripts/ci_build.py @@ -45,7 +45,8 @@ def build_targets(target, target_os): yield 'bogo_shim' def determine_flags(target, target_os, target_cpu, target_cc, cc_bin, - ccache, root_dir, pkcs11_lib, use_gdb, disable_werror, extra_cxxflags): + ccache, root_dir, pkcs11_lib, use_gdb, disable_werror, extra_cxxflags, + disabled_tests): # pylint: disable=too-many-branches,too-many-statements,too-many-arguments,too-many-locals """ @@ -107,7 +108,7 @@ def determine_flags(target, target_os, target_cpu, target_cc, cc_bin, if target == 'cross-win64': # this test compiles under MinGW but fails when run under Wine - test_cmd += ['--skip-tests=certstor_system'] + disabled_tests.append('certstor_system') if target == 'coverage': flags += ['--with-coverage-info', '--with-debug-info', '--test-mode'] @@ -127,7 +128,7 @@ def determine_flags(target, target_os, target_cpu, target_cc, cc_bin, 'pbkdf', 'argon2', 'bcrypt', 'bcrypt_pbkdf', 'compression', 'ed25519_sign', 'elgamal_keygen', 'x509_path_rsa_pss'] - test_cmd += ['--skip-tests=%s' % (','.join(slow_tests))] + disabled_tests += slow_tests if target == 'fuzzers': flags += ['--unsafe-fuzzer-mode'] @@ -270,8 +271,14 @@ def determine_flags(target, target_os, target_cpu, target_cc, cc_bin, run_test_command = None else: if use_gdb: + disabled_tests.append("os_utils") + + # render 'disabled_tests' array into test_cmd + if disabled_tests: + test_cmd += ['--skip-tests=%s' % (','.join(disabled_tests))] + + if use_gdb: (cmd, args) = test_cmd[0], test_cmd[1:] - args += ['--skip-tests=os_utils'] run_test_command = test_prefix + ['gdb', cmd, '-ex', 'run %s' % (' '.join(args)), '-ex', 'bt', @@ -359,6 +366,8 @@ def parse_args(args): help='Build via amalgamation') parser.add_option('--disable-shared', action='store_true', default=False, help='Disable building shared libraries') + parser.add_option('--disabled-tests', metavar='DISABLED_TESTS', default=[], action='append', + help='Comma separated list of tests that should not be run') parser.add_option('--branch', metavar='B', default=None, help='Specify branch being built') @@ -495,7 +504,7 @@ def main(args=None): target, options.os, options.cpu, options.cc, options.cc_bin, options.compiler_cache, root_dir, options.pkcs11_lib, options.use_gdb, options.disable_werror, - options.extra_cxxflags) + options.extra_cxxflags, options.disabled_tests) cmds.append([py_interp, os.path.join(root_dir, 'configure.py')] + config_flags) |