mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 12:13:43 +00:00
etc/tidy: don't check SNAP against triple
This commit is contained in:
parent
2bf575c86f
commit
fc1d655ed2
@ -195,7 +195,30 @@ def make_snapshot(stage, triple):
|
||||
|
||||
return file1
|
||||
|
||||
def determine_curr_snapshot_info(triple):
|
||||
def curr_snapshot_rev():
|
||||
i = 0
|
||||
found_snap = False
|
||||
date = None
|
||||
rev = None
|
||||
|
||||
f = open(snapshotfile)
|
||||
for line in f.readlines():
|
||||
i += 1
|
||||
parsed = parse_line(i, line)
|
||||
if (not parsed): continue
|
||||
|
||||
if parsed["type"] == "snapshot":
|
||||
date = parsed["date"]
|
||||
rev = parsed["rev"]
|
||||
found_snap = True
|
||||
break
|
||||
|
||||
if not found_snap:
|
||||
raise Exception("no snapshot entries in file")
|
||||
|
||||
return (date, rev)
|
||||
|
||||
def determine_curr_snapshot(triple):
|
||||
i = 0
|
||||
platform = get_platform(triple)
|
||||
|
||||
@ -228,7 +251,4 @@ def determine_curr_snapshot_info(triple):
|
||||
raise Exception("no snapshot file found for platform %s, rev %s" %
|
||||
(platform, rev))
|
||||
|
||||
return (date, rev, platform, hsh)
|
||||
|
||||
def determine_curr_snapshot(triple):
|
||||
return full_snapshot_name(*determine_curr_snapshot_info(triple))
|
||||
return full_snapshot_name(date, rev, platform, hsh)
|
||||
|
@ -57,12 +57,13 @@ try:
|
||||
match = re.match(r'^.*//\s*SNAP\s+(\w+)', line)
|
||||
if match:
|
||||
hsh = match.group(1)
|
||||
a, b, c, phash = snapshot.determine_curr_snapshot_info()
|
||||
if not phash.startswith(hsh):
|
||||
report_err("Snapshot out of date: " + line)
|
||||
date, rev = snapshot.curr_snapshot_rev()
|
||||
if not hsh.startswith(rev):
|
||||
report_err("snapshot out of date (" + date
|
||||
+ "): " + line)
|
||||
else:
|
||||
if "SNAP" in line:
|
||||
report_warn("Unmatched SNAP line: " + line)
|
||||
report_warn("unmatched SNAP line: " + line)
|
||||
|
||||
if (line.find('\t') != -1 and
|
||||
fileinput.filename().find("Makefile") == -1):
|
||||
|
Loading…
Reference in New Issue
Block a user