Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Side by Side Diff: tools/test.py

Issue 8739: Changed the parsing a conditional expression in a test status file to look fo... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2008 the V8 project authors. All rights reserved. 3 # Copyright 2008 the V8 project authors. All rights reserved.
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 right = ParseOperatorExpression(scan) 879 right = ParseOperatorExpression(scan)
880 if not right: 880 if not right:
881 return None 881 return None
882 left = Operation(left, op, right) 882 left = Operation(left, op, right)
883 return left 883 return left
884 884
885 885
886 def ParseConditionalExpression(scan): 886 def ParseConditionalExpression(scan):
887 left = ParseOperatorExpression(scan) 887 left = ParseOperatorExpression(scan)
888 if not left: return None 888 if not left: return None
889 while scan.HasMore() and (scan.Current() == 'IF'): 889 while scan.HasMore() and (scan.Current() == 'if'):
890 scan.Advance() 890 scan.Advance()
891 right = ParseOperatorExpression(scan) 891 right = ParseOperatorExpression(scan)
892 if not right: 892 if not right:
893 return None 893 return None
894 left= Operation(left, 'if', right) 894 left= Operation(left, 'if', right)
895 return left 895 return left
896 896
897 897
898 LOGICALS = ["&&", "||", ","] 898 LOGICALS = ["&&", "||", ","]
899 def ParseLogicalExpression(scan): 899 def ParseLogicalExpression(scan):
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 for entry in timed_tests[:20]: 1298 for entry in timed_tests[:20]:
1299 t = FormatTime(entry.duration) 1299 t = FormatTime(entry.duration)
1300 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) 1300 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel()))
1301 index += 1 1301 index += 1
1302 1302
1303 return result 1303 return result
1304 1304
1305 1305
1306 if __name__ == '__main__': 1306 if __name__ == '__main__':
1307 sys.exit(Main()) 1307 sys.exit(Main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698