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

Side by Side Diff: scripts/master/unittests/status_logger_test.py

Issue 1507993003: status_logger: record step data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 5 years 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2015 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import contextlib 6 import contextlib
7 import json 7 import json
8 import os 8 import os
9 import tempfile 9 import tempfile
10 import shutil 10 import shutil
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 def getProperty(self, _name): 43 def getProperty(self, _name):
44 return 1427929423.0 44 return 1427929423.0
45 45
46 def getProperties(self): 46 def getProperties(self):
47 return Properties() 47 return Properties()
48 48
49 def getSourceStamp(self): 49 def getSourceStamp(self):
50 return SourceStamp() 50 return SourceStamp()
51 51
52 def getSteps(self):
53 return []
54
52 def getTimes(self): 55 def getTimes(self):
53 return 5000, 6000 56 return 5000, 6000
54 57
55 58
56 class Step(object): 59 class Step(object):
57 step_number = 8 60 step_number = 8
58 def getName(self): 61 def getName(self):
59 return 'reticulating_splines' 62 return 'reticulating_splines'
60 63
61 def getTimes(self): 64 def getTimes(self):
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 self.assertTrue(os.path.exists(logger._event_logfile)) 179 self.assertTrue(os.path.exists(logger._event_logfile))
177 # Ensure we added valid json 180 # Ensure we added valid json
178 with open(logger._event_logfile, 'r') as f: 181 with open(logger._event_logfile, 'r') as f:
179 content = f.read() 182 content = f.read()
180 self.assertTrue(content) 183 self.assertTrue(content)
181 json.loads(content) 184 json.loads(content)
182 185
183 186
184 if __name__ == '__main__': 187 if __name__ == '__main__':
185 unittest.main() 188 unittest.main()
OLDNEW
« scripts/master/status_logger.py ('K') | « scripts/master/status_logger.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698