OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/env python |
2 | 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
3 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | |
4 # 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 |
5 # found in the LICENSE file. | 4 # found in the LICENSE file. |
6 | 5 |
7 # This script should be run manually on occasion to make sure the gyp file and | 6 """This script should be run manually on occasion to make sure the gyp file and |
8 # the includes tests are up to date. | 7 the includes tests are up to date. |
9 # It does the following: | 8 |
10 # - Verifies that all source code is in ppapi.gyp | 9 It does the following: |
11 # - Verifies that all sources in ppapi.gyp really do exist | 10 - Verifies that all source code is in ppapi.gyp |
12 # - Generates tests/test_c_includes.c | 11 - Verifies that all sources in ppapi.gyp really do exist |
13 # - Generates tests/test_cpp_includes.cc | 12 - Generates tests/test_c_includes.c |
14 # These tests are checked in to SVN. | 13 - Generates tests/test_cpp_includes.cc |
| 14 These tests are checked in to SVN. |
| 15 """ |
15 # TODO(dmichael): Make this script execute as a gyp action, move the include | 16 # TODO(dmichael): Make this script execute as a gyp action, move the include |
16 # tests to some 'generated' area, and remove them from version | 17 # tests to some 'generated' area, and remove them from version |
17 # control. | 18 # control. |
18 | 19 |
19 import re | 20 import re |
20 import os | 21 import os |
21 import sys | 22 import sys |
22 import posixpath | 23 import posixpath |
23 | 24 |
24 # A simple regular expression that should match source files for C++ and C. | 25 # A simple regular expression that should match source files for C++ and C. |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 gyp_file_contents = open(ppapi_gyp_file_name).read() | 162 gyp_file_contents = open(ppapi_gyp_file_name).read() |
162 gyp_file_data = eval(gyp_file_contents) | 163 gyp_file_data = eval(gyp_file_contents) |
163 VerifyGypFile(gyp_file_data) | 164 VerifyGypFile(gyp_file_data) |
164 GenerateCIncludeTest(gyp_file_data) | 165 GenerateCIncludeTest(gyp_file_data) |
165 GenerateCCIncludeTest(gyp_file_data) | 166 GenerateCCIncludeTest(gyp_file_data) |
166 return 0 | 167 return 0 |
167 | 168 |
168 | 169 |
169 if __name__ == '__main__': | 170 if __name__ == '__main__': |
170 sys.exit(main()) | 171 sys.exit(main()) |
171 | |
OLD | NEW |