Merge pull request #9436 from a3d4/improve-error-coverage-256-warnings

Improve error coverage (white list build-specific warnings)
This commit is contained in:
chriseth 2020-07-23 13:44:13 +02:00 committed by GitHub
commit ba4e05c62c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -186,6 +186,16 @@ def examine_id_coverage(top_dir, source_id_to_file_names):
# Warning (3420): Source file does not specify required compiler version!
test_ids |= find_ids_in_cmdline_test_err(path.join(top_dir, "test", "cmdlineTests", "error_codes", "err"))
# white list of ids which are not covered by tests
white_ids = {
"3805", # "This is a pre-release compiler version, please do not use it in production."
# The warning may or may not exist in a compiler build.
"4591" # "There are more than 256 warnings. Ignoring the rest."
# Due to 3805, the warning lists look different for different compiler builds.
}
assert len(test_ids & white_ids) == 0, "The sets are not supposed to intersect"
test_ids |= white_ids
print(f"IDs in source files: {len(source_ids)}")
print(f"IDs in test files : {len(test_ids)} ({len(test_ids) - len(source_ids)})")
print()