mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	update_bugs_by_version: Don't fail when the list gets updated
This commit is contained in:
		
							parent
							
								
									c1cbffc814
								
							
						
					
					
						commit
						8874627dda
					
				| @ -8,7 +8,6 @@ | |||||||
| 
 | 
 | ||||||
| import json | import json | ||||||
| import re | import re | ||||||
| import sys |  | ||||||
| from pathlib import Path | from pathlib import Path | ||||||
| 
 | 
 | ||||||
| def comp(version_string): | def comp(version_string): | ||||||
| @ -35,7 +34,9 @@ for key, value in versions.items(): | |||||||
|             continue |             continue | ||||||
|         value['bugs'] += [bug['name']] |         value['bugs'] += [bug['name']] | ||||||
| 
 | 
 | ||||||
| new_contents = json.dumps(versions, sort_keys=True, indent=4, separators=(',', ': ')) | (root_path / 'docs/bugs_by_version.json').write_text(json.dumps( | ||||||
| old_contents = (root_path / 'docs/bugs_by_version.json').read_text(encoding='utf8') |     versions, | ||||||
| (root_path / 'docs/bugs_by_version.json').write_text(new_contents, encoding='utf8') |     sort_keys=True, | ||||||
| sys.exit(old_contents != new_contents) |     indent=4, | ||||||
|  |     separators=(',', ': ') | ||||||
|  | ), encoding='utf8') | ||||||
|  | |||||||
| @ -375,8 +375,13 @@ function test_via_ir_equivalence() | |||||||
| 
 | 
 | ||||||
| ## RUN | ## RUN | ||||||
| 
 | 
 | ||||||
| echo "Checking that the bug list is up to date..." | SOLTMPDIR=$(mktemp -d) | ||||||
| "$REPO_ROOT"/scripts/update_bugs_by_version.py | printTask "Checking that the bug list is up to date..." | ||||||
|  | cp "${REPO_ROOT}/docs/bugs_by_version.json" "${SOLTMPDIR}/original_bugs_by_version.json" | ||||||
|  | "${REPO_ROOT}/scripts/update_bugs_by_version.py" | ||||||
|  | diff --unified "${SOLTMPDIR}/original_bugs_by_version.json" "${REPO_ROOT}/docs/bugs_by_version.json" || \ | ||||||
|  |     fail "The bug list in bugs_by_version.json was out of date and has been updated. Please investigate and submit a bugfix if necessary." | ||||||
|  | rm -r "$SOLTMPDIR" | ||||||
| 
 | 
 | ||||||
| printTask "Testing unknown options..." | printTask "Testing unknown options..." | ||||||
| ( | ( | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user