(type, vdir, arversion, current_ver)
| 96 | return 0 # File passed the test |
| 97 | |
| 98 | def test_object_wrapper(type, vdir, arversion, current_ver): |
| 99 | _numtests = 0 |
| 100 | _failed = 0 |
| 101 | unrecognized = "" |
| 102 | |
| 103 | if subprocess.call([CEPH_DENCODER, "type", type], stderr=subprocess.DEVNULL) == 0: |
| 104 | |
| 105 | if should_skip_object(type, arversion, current_ver): |
| 106 | debug_print(f"skipping object of type {type} due to backward incompatibility") |
| 107 | return (_numtests, _failed, unrecognized) |
| 108 | if type in incompat_paths: |
| 109 | debug_print(f"skipping object of type {type} it is in incompat paths") |
| 110 | return (_numtests, _failed, unrecognized) |
| 111 | |
| 112 | debug_print(f" {vdir}/objects/{type}") |
| 113 | files = list(vdir.joinpath("objects", type).glob('*')) |
| 114 | files_without_incompat = [] |
| 115 | |
| 116 | # Check symbolic links |
| 117 | if type in incompat_paths: |
| 118 | incompatible_files = set(incompat_paths[type]) |
| 119 | files_without_incompat = [f for f in files if f.name not in incompatible_files] |
| 120 | else: |
| 121 | files_without_incompat = files |
| 122 | |
| 123 | with concurrent.futures.ThreadPoolExecutor() as executor: |
| 124 | results = [executor.submit(process_type, f, type) for f in files_without_incompat] |
| 125 | |
| 126 | for result in concurrent.futures.as_completed(results): |
| 127 | _numtests += 1 |
| 128 | _failed += result.result() |
| 129 | else: |
| 130 | unrecognized = type |
| 131 | debug_print("skipping unrecognized type {} return {}".format(type, (_numtests, _failed, unrecognized))) |
| 132 | |
| 133 | return (_numtests, _failed, unrecognized) |
| 134 | |
| 135 | def parse_version(version): |
| 136 | """ |
nothing calls this directly
no test coverage detected