2 # -*- coding: utf-8 -*-
7 # Regressions for these tools does not cause failure
8 REGRESSION_OK = ["rustc-guide", "miri"]
10 if __name__ == '__main__':
12 toolstate_file = sys.argv[2]
13 current_state = sys.argv[3]
14 verb = sys.argv[4] # 'regressed' or 'changed'
16 with open(toolstate_file, 'r') as f:
17 toolstate = json.load(f)
18 with open(current_state, 'r') as f:
19 current = json.load(f)
25 new_state = toolstate.get(tool, '')
26 if verb == 'regressed':
27 updated = new_state < state
28 elif verb == 'changed':
29 updated = new_state != state
31 print('Unknown verb {}'.format(updated))
35 'The state of "{}" has {} from "{}" to "{}"'
36 .format(tool, verb, state, new_state)
38 if tool not in REGRESSION_OK: