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

Side by Side Diff: tools/testrunner/objects/testcase.py

Issue 2724373002: [date] Add ICU backend for timezone info behind a flag (Closed)
Patch Set: Use distinctive prefix Created 3 years, 8 months 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
OLDNEW
1 # Copyright 2012 the V8 project authors. All rights reserved. 1 # Copyright 2012 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
(...skipping 23 matching lines...) Expand all
34 self.suite = suite # TestSuite object 34 self.suite = suite # TestSuite object
35 self.path = path # string, e.g. 'div-mod', 'test-api/foo' 35 self.path = path # string, e.g. 'div-mod', 'test-api/foo'
36 self.flags = flags or [] # list of strings, flags specific to this test 36 self.flags = flags or [] # list of strings, flags specific to this test
37 self.variant = variant # name of the used testing variant 37 self.variant = variant # name of the used testing variant
38 self.override_shell = override_shell 38 self.override_shell = override_shell
39 self.outcomes = frozenset([]) 39 self.outcomes = frozenset([])
40 self.output = None 40 self.output = None
41 self.id = None # int, used to map result back to TestCase instance 41 self.id = None # int, used to map result back to TestCase instance
42 self.duration = None # assigned during execution 42 self.duration = None # assigned during execution
43 self.run = 1 # The nth time this test is executed. 43 self.run = 1 # The nth time this test is executed.
44 self.env = {}
44 45
45 def CopyAddingFlags(self, variant, flags): 46 def CopyAddingFlags(self, variant, flags):
46 copy = TestCase(self.suite, self.path, variant, self.flags + flags, 47 copy = TestCase(self.suite, self.path, variant, self.flags + flags,
47 self.override_shell) 48 self.override_shell)
48 copy.outcomes = self.outcomes 49 copy.outcomes = self.outcomes
Michael Achenbach 2017/04/07 13:02:10 Please add copying env here, just like outcomes.
Dan Ehrenberg 2017/04/07 14:06:09 Done. What uses this, so I can test it? I ran all
Michael Achenbach 2017/04/11 08:38:36 Hard to tell, maybe it's a noop. The copy method i
49 return copy 50 return copy
50 51
51 def PackTask(self): 52 def PackTask(self):
Michael Achenbach 2017/04/07 13:02:10 Though we neither really support nor test it, mayb
Dan Ehrenberg 2017/04/07 14:06:09 Done.
52 """ 53 """
53 Extracts those parts of this object that are required to run the test 54 Extracts those parts of this object that are required to run the test
54 and returns them as a JSON serializable object. 55 and returns them as a JSON serializable object.
55 """ 56 """
56 assert self.id is not None 57 assert self.id is not None
57 return [self.suitename(), self.path, self.variant, self.flags, 58 return [self.suitename(), self.path, self.variant, self.flags,
58 self.override_shell, list(self.outcomes or []), 59 self.override_shell, list(self.outcomes or []),
59 self.id] 60 self.id]
60 61
61 @staticmethod 62 @staticmethod
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 def __cmp__(self, other): 105 def __cmp__(self, other):
105 # Make sure that test cases are sorted correctly if sorted without 106 # Make sure that test cases are sorted correctly if sorted without
106 # key function. But using a key function is preferred for speed. 107 # key function. But using a key function is preferred for speed.
107 return cmp( 108 return cmp(
108 (self.suite.name, self.path, self.flags), 109 (self.suite.name, self.path, self.flags),
109 (other.suite.name, other.path, other.flags), 110 (other.suite.name, other.path, other.flags),
110 ) 111 )
111 112
112 def __str__(self): 113 def __str__(self):
113 return "[%s/%s %s]" % (self.suite.name, self.path, self.flags) 114 return "[%s/%s %s]" % (self.suite.name, self.path, self.flags)
OLDNEW
« tools/testrunner/local/commands.py ('K') | « tools/testrunner/local/execution.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698