| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2017 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2017 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 """Helper to update the "net_unittests_bundle_data" section of | 6 """Helper to update the "net_unittests_bundle_data" section of |
| 7 //net/BUILD.gn so that it lists all of the current files (based on | 7 //net/BUILD.gn so that it lists all of the current files (based on |
| 8 simpler globbing rules). | 8 simpler globbing rules). |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 "data/cert_issuer_source_static_unittest/*.pem", | 44 "data/cert_issuer_source_static_unittest/*.pem", |
| 45 "data/certificate_policies_unittest/*.pem", | 45 "data/certificate_policies_unittest/*.pem", |
| 46 "data/filter_unittests/*", | 46 "data/filter_unittests/*", |
| 47 "data/name_constraints_unittest/*.pem", | 47 "data/name_constraints_unittest/*.pem", |
| 48 "data/parse_certificate_unittest/*.pem", | 48 "data/parse_certificate_unittest/*.pem", |
| 49 "data/parse_ocsp_unittest/*.pem", | 49 "data/parse_ocsp_unittest/*.pem", |
| 50 "data/test.html", | 50 "data/test.html", |
| 51 "data/url_request_unittest/*", | 51 "data/url_request_unittest/*", |
| 52 "data/verify_certificate_chain_unittest/**/*.pem", | 52 "data/verify_certificate_chain_unittest/**/*.pem", |
| 53 "data/verify_certificate_chain_unittest/**/*.test", | 53 "data/verify_certificate_chain_unittest/**/*.test", |
| 54 "data/verify_certificate_chain_unittest/pkits_errors/*.txt", |
| 54 "data/verify_name_match_unittest/names/*.pem", | 55 "data/verify_name_match_unittest/names/*.pem", |
| 55 "data/verify_signed_data_unittest/*.pem", | 56 "data/verify_signed_data_unittest/*.pem", |
| 56 "third_party/nist-pkits/certs/*.crt", | 57 "third_party/nist-pkits/certs/*.crt", |
| 57 "third_party/nist-pkits/crls/*.crl", | 58 "third_party/nist-pkits/crls/*.crl", |
| 58 ] | 59 ] |
| 59 | 60 |
| 60 # This regular expression identifies the "sources" section of | 61 # This regular expression identifies the "sources" section of |
| 61 # net_unittests_bundle_data | 62 # net_unittests_bundle_data |
| 62 net_unittest_bundle_data_regex = re.compile(r""" | 63 net_unittest_bundle_data_regex = re.compile(r""" |
| 63 bundle_data\("net_unittests_bundle_data"\) \{ | 64 bundle_data\("net_unittests_bundle_data"\) \{ |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 # the current results of file globbing. | 138 # the current results of file globbing. |
| 138 data = replace_sources(data, net_unittest_bundle_data_regex, | 139 data = replace_sources(data, net_unittest_bundle_data_regex, |
| 139 net_unittest_bundle_data_globs) | 140 net_unittest_bundle_data_globs) |
| 140 | 141 |
| 141 write_string_to_file(data, path) | 142 write_string_to_file(data, path) |
| 142 print "Wrote %s" % path | 143 print "Wrote %s" % path |
| 143 | 144 |
| 144 | 145 |
| 145 if __name__ == '__main__': | 146 if __name__ == '__main__': |
| 146 sys.exit(main()) | 147 sys.exit(main()) |
| OLD | NEW |