OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 # Copyright 2014 Google Inc. | 3 # Copyright 2014 Google Inc. |
4 # | 4 # |
5 # Use of this source code is governed by a BSD-style license that can be | 5 # Use of this source code is governed by a BSD-style license that can be |
6 # found in the LICENSE file. | 6 # found in the LICENSE file. |
7 | 7 |
8 """ | 8 """ |
9 Test makefile_writer.py | 9 Test makefile_writer.py |
10 """ | 10 """ |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 deviations_from_common=deviations) | 112 deviations_from_common=deviations) |
113 | 113 |
114 def generate_dummy_tool_makefile(target_dir): | 114 def generate_dummy_tool_makefile(target_dir): |
115 """Create a dummy makefile for a tool. | 115 """Create a dummy makefile for a tool. |
116 | 116 |
117 Args: | 117 Args: |
118 target_dir: directory in which to write the resulting Android.mk | 118 target_dir: directory in which to write the resulting Android.mk |
119 """ | 119 """ |
120 vars_dict = generate_dummy_vars_dict(None) | 120 vars_dict = generate_dummy_vars_dict(None) |
121 tool_makefile_writer.write_tool_android_mk(target_dir=target_dir, | 121 tool_makefile_writer.write_tool_android_mk(target_dir=target_dir, |
122 var_dict=vars_dict) | 122 var_dict=vars_dict, |
| 123 place_in_local_tmp=False) |
123 | 124 |
124 | 125 |
125 class MakefileWriterTest(unittest.TestCase): | 126 class MakefileWriterTest(unittest.TestCase): |
126 | 127 |
127 def test_write_group_empty(self): | 128 def test_write_group_empty(self): |
128 f = tempfile.TemporaryFile() | 129 f = tempfile.TemporaryFile() |
129 assert f.tell() == 0 | 130 assert f.tell() == 0 |
130 for empty in (None, []): | 131 for empty in (None, []): |
131 for truth in (True, False): | 132 for truth in (True, False): |
132 makefile_writer.write_group(f, 'name', empty, truth) | 133 makefile_writer.write_group(f, 'name', empty, truth) |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 parser = argparse.ArgumentParser() | 216 parser = argparse.ArgumentParser() |
216 parser.add_argument('-r', '--rebaseline', help='Rebaseline expectations.', | 217 parser.add_argument('-r', '--rebaseline', help='Rebaseline expectations.', |
217 action='store_true') | 218 action='store_true') |
218 args = parser.parse_args() | 219 args = parser.parse_args() |
219 | 220 |
220 if args.rebaseline: | 221 if args.rebaseline: |
221 rebaseline() | 222 rebaseline() |
222 else: | 223 else: |
223 main() | 224 main() |
224 | 225 |
OLD | NEW |