OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2010 The Native Client Authors. All rights reserved. Use | 3 # Copyright 2010 The Native Client Authors. All rights reserved. Use |
4 # of this source code is governed by a BSD-style license that can be | 4 # of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 # | 6 # |
7 # This tool generates bad x86_64 NaCl modules that should never be | 7 # This tool generates bad x86_64 NaCl modules that should never be |
8 # generated by a conformant compiler. These bad modules are used to | 8 # generated by a conformant compiler. These bad modules are used to |
9 # test that sel_ldr correctly detects that these are bad modules. | 9 # test that sel_ldr correctly detects that these are bad modules. |
10 # | 10 # |
11 # The detailed info about the fib_scalar.nexe used as input: | 11 # The detailed info about the fib_scalar.nexe used as input: |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 186 |
187 def UpdateFileWithChangeList(src_file, dst_file, change_list): | 187 def UpdateFileWithChangeList(src_file, dst_file, change_list): |
188 data = open(src_file).read() | 188 data = open(src_file).read() |
189 data = UpdateData(data, change_list) | 189 data = UpdateData(data, change_list) |
190 open(dst_file, 'w').write(data) | 190 open(dst_file, 'w').write(data) |
191 | 191 |
192 if __name__ == '__main__': | 192 if __name__ == '__main__': |
193 for src_file, dst_file, cl in FILE_MODIFICATIONS: | 193 for src_file, dst_file, cl in FILE_MODIFICATIONS: |
194 UpdateFileWithChangeList(src_file, dst_file, cl) | 194 UpdateFileWithChangeList(src_file, dst_file, cl) |
195 sys.exit(0) | 195 sys.exit(0) |
OLD | NEW |