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

Side by Side Diff: scripts/common/unittests/annotator_test.py

Issue 22449006: Second attempt at adding archive_layout_test_results to the blink trybots. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Fix archive_layout_tests to take gs-bucket Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 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 """Unit tests for classes in annotator.py.""" 6 """Unit tests for classes in annotator.py."""
7 7
8 import cStringIO 8 import cStringIO
9 import json 9 import json
10 import os 10 import os
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 s.step_failure() 71 s.step_failure()
72 s.step_exception() 72 s.step_exception()
73 s.step_clear() 73 s.step_clear()
74 s.step_summary_clear() 74 s.step_summary_clear()
75 s.step_text('hello') 75 s.step_text('hello')
76 s.step_summary_text('hello!') 76 s.step_summary_text('hello!')
77 s.step_log_line('mylog', 'test') 77 s.step_log_line('mylog', 'test')
78 s.step_log_end('mylog') 78 s.step_log_end('mylog')
79 s.step_log_line('myperflog', 'perf data') 79 s.step_log_line('myperflog', 'perf data')
80 s.step_log_end_perf('myperflog', 'dashboardname') 80 s.step_log_end_perf('myperflog', 'dashboardname')
81 s.step_link('cool_link', 'https://cool.example.com/beano_gnarly')
81 s.write_log_lines('full_log', ['line one', 'line two']) 82 s.write_log_lines('full_log', ['line one', 'line two'])
82 s.write_log_lines('full_perf_log', ['perf line one', 'perf line two'], 83 s.write_log_lines('full_perf_log', ['perf line one', 'perf line two'],
83 perf='full_perf') 84 perf='full_perf')
84 85
85 result = [ 86 result = [
86 '@@@SEED_STEP one@@@', 87 '@@@SEED_STEP one@@@',
87 '@@@STEP_CURSOR one@@@', 88 '@@@STEP_CURSOR one@@@',
88 '@@@STEP_STARTED@@@', 89 '@@@STEP_STARTED@@@',
89 '@@@STEP_WARNINGS@@@', 90 '@@@STEP_WARNINGS@@@',
90 '@@@STEP_FAILURE@@@', 91 '@@@STEP_FAILURE@@@',
91 '@@@STEP_EXCEPTION@@@', 92 '@@@STEP_EXCEPTION@@@',
92 '@@@STEP_CLEAR@@@', 93 '@@@STEP_CLEAR@@@',
93 '@@@STEP_SUMMARY_CLEAR@@@', 94 '@@@STEP_SUMMARY_CLEAR@@@',
94 '@@@STEP_TEXT@hello@@@', 95 '@@@STEP_TEXT@hello@@@',
95 '@@@STEP_SUMMARY_TEXT@hello!@@@', 96 '@@@STEP_SUMMARY_TEXT@hello!@@@',
96 '@@@STEP_LOG_LINE@mylog@test@@@', 97 '@@@STEP_LOG_LINE@mylog@test@@@',
97 '@@@STEP_LOG_END@mylog@@@', 98 '@@@STEP_LOG_END@mylog@@@',
98 '@@@STEP_LOG_LINE@myperflog@perf data@@@', 99 '@@@STEP_LOG_LINE@myperflog@perf data@@@',
99 '@@@STEP_LOG_END_PERF@myperflog@dashboardname@@@', 100 '@@@STEP_LOG_END_PERF@myperflog@dashboardname@@@',
101 '@@@STEP_LINK@cool_link@https://cool.example.com/beano_gnarly@@@',
100 '@@@STEP_LOG_LINE@full_log@line one@@@', 102 '@@@STEP_LOG_LINE@full_log@line one@@@',
101 '@@@STEP_LOG_LINE@full_log@line two@@@', 103 '@@@STEP_LOG_LINE@full_log@line two@@@',
102 '@@@STEP_LOG_END@full_log@@@', 104 '@@@STEP_LOG_END@full_log@@@',
103 '@@@STEP_LOG_LINE@full_perf_log@perf line one@@@', 105 '@@@STEP_LOG_LINE@full_perf_log@perf line one@@@',
104 '@@@STEP_LOG_LINE@full_perf_log@perf line two@@@', 106 '@@@STEP_LOG_LINE@full_perf_log@perf line two@@@',
105 '@@@STEP_LOG_END_PERF@full_perf_log@full_perf@@@', 107 '@@@STEP_LOG_END_PERF@full_perf_log@full_perf@@@',
106 '@@@STEP_CURSOR one@@@', 108 '@@@STEP_CURSOR one@@@',
107 '@@@STEP_CLOSED@@@', 109 '@@@STEP_CLOSED@@@',
108 ] 110 ]
109 111
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 'cmd': _synthesizeCmd(['print \'@@@SEED_STEP blah@@@\'']), 463 'cmd': _synthesizeCmd(['print \'@@@SEED_STEP blah@@@\'']),
462 'ignore_annotations': True 464 'ignore_annotations': True
463 },] 465 },]
464 ret = self._runAnnotator(cmdlist) 466 ret = self._runAnnotator(cmdlist)
465 self.assertFalse('@@@SEED_STEP blah@@@' in self.capture.text) 467 self.assertFalse('@@@SEED_STEP blah@@@' in self.capture.text)
466 self.assertEquals(ret, 0) 468 self.assertEquals(ret, 0)
467 469
468 470
469 if __name__ == '__main__': 471 if __name__ == '__main__':
470 unittest.main() 472 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698