| 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 shutil | 9 import shutil |
| 10 import subprocess | 10 import subprocess |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 # TODO(maruel): Make sure there is no Unexpected part, even in the case of | 95 # TODO(maruel): Make sure there is no Unexpected part, even in the case of |
| 96 # virtualenv usage. | 96 # virtualenv usage. |
| 97 self.assertEquals(expected_end, actual[-len(expected_end):]) | 97 self.assertEquals(expected_end, actual[-len(expected_end):]) |
| 98 | 98 |
| 99 def test_trace_gyp(self): | 99 def test_trace_gyp(self): |
| 100 import trace_inputs | 100 import trace_inputs |
| 101 expected_value = { | 101 expected_value = { |
| 102 'conditions': [ | 102 'conditions': [ |
| 103 ['OS=="%s"' % trace_inputs.get_flavor(), { | 103 ['OS=="%s"' % trace_inputs.get_flavor(), { |
| 104 'variables': { | 104 'variables': { |
| 105 'isolate_files': [ | 105 'isolate_dependency_tracked': [ |
| 106 '<(DEPTH)/trace_inputs.py', | 106 '<(DEPTH)/trace_inputs.py', |
| 107 '<(DEPTH)/%s' % FILENAME, | 107 '<(DEPTH)/%s' % FILENAME, |
| 108 ], | 108 ], |
| 109 'isolate_dirs': [ | 109 'isolate_dependency_untracked': [ |
| 110 'trace_inputs/', | 110 'trace_inputs/', |
| 111 ], | 111 ], |
| 112 }, | 112 }, |
| 113 }], | 113 }], |
| 114 ], | 114 ], |
| 115 } | 115 } |
| 116 expected_buffer = cStringIO.StringIO() | 116 expected_buffer = cStringIO.StringIO() |
| 117 trace_inputs.pretty_print(expected_value, expected_buffer) | 117 trace_inputs.pretty_print(expected_value, expected_buffer) |
| 118 | 118 |
| 119 actual = self._execute(True) | 119 actual = self._execute(True) |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 if sys.argv[1] == '--child': | 158 if sys.argv[1] == '--child': |
| 159 return child() | 159 return child() |
| 160 if sys.argv[1] == '--child-gyp': | 160 if sys.argv[1] == '--child-gyp': |
| 161 return child_gyp() | 161 return child_gyp() |
| 162 | 162 |
| 163 unittest.main() | 163 unittest.main() |
| 164 | 164 |
| 165 | 165 |
| 166 if __name__ == '__main__': | 166 if __name__ == '__main__': |
| 167 sys.exit(main()) | 167 sys.exit(main()) |
| OLD | NEW |