OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 cStringIO | 6 import cStringIO |
7 import logging | 7 import logging |
8 import os | 8 import os |
9 import unittest | 9 import unittest |
10 import sys | 10 import sys |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 ] | 163 ] |
164 command = [ | 164 command = [ |
165 '/home/foo_bar_user/out/unittests', '--gtest_filter=AtExitTest.Basic', | 165 '/home/foo_bar_user/out/unittests', '--gtest_filter=AtExitTest.Basic', |
166 ] | 166 ] |
167 self._test_lines(lines, '/home/foo_bar_user/src', files, command) | 167 self._test_lines(lines, '/home/foo_bar_user/src', files, command) |
168 | 168 |
169 def test_empty(self): | 169 def test_empty(self): |
170 try: | 170 try: |
171 self._load_context([], None) | 171 self._load_context([], None) |
172 self.fail() | 172 self.fail() |
173 except AssertionError: | 173 except trace_inputs.TracingFailure, e: |
174 pass | 174 expected = ( |
| 175 'Found internal inconsitency in process lifetime detection', |
| 176 None, |
| 177 None, |
| 178 None, |
| 179 []) |
| 180 self.assertEquals(expected, e.args) |
175 | 181 |
176 def test_close(self): | 182 def test_close(self): |
177 lines = [ | 183 lines = [ |
178 (self._ROOT_PID, 'close(7) = 0'), | 184 (self._ROOT_PID, 'close(7) = 0'), |
179 ] | 185 ] |
180 self._test_lines(lines, '/home/foo_bar_user/src', []) | 186 self._test_lines(lines, '/home/foo_bar_user/src', []) |
181 | 187 |
182 def test_clone(self): | 188 def test_clone(self): |
183 # Grand-child with relative directory. | 189 # Grand-child with relative directory. |
184 lines = [ | 190 lines = [ |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 'size': -1, | 368 'size': -1, |
363 }, | 369 }, |
364 ] | 370 ] |
365 self._test_lines(lines, '/home/foo_bar_user/src', files) | 371 self._test_lines(lines, '/home/foo_bar_user/src', files) |
366 | 372 |
367 | 373 |
368 if __name__ == '__main__': | 374 if __name__ == '__main__': |
369 VERBOSE = '-v' in sys.argv | 375 VERBOSE = '-v' in sys.argv |
370 logging.basicConfig(level=logging.DEBUG if VERBOSE else logging.ERROR) | 376 logging.basicConfig(level=logging.DEBUG if VERBOSE else logging.ERROR) |
371 unittest.main() | 377 unittest.main() |
OLD | NEW |