Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Side by Side Diff: net/data/update_net_gypi.py

Issue 2574413002: Make static (preloaded) security state generation part of the build process. (Closed)
Patch Set: also run generator for nacl. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 import re 6 import re
7 import StringIO 7 import StringIO
8 import sys 8 import sys
9 9
10 10
11 VARIABLE_PATTERN = re.compile("^(?P<indentation>\s*)'(?P<name>[^']*)':\s*\[$") 11 VARIABLE_PATTERN = re.compile("^(?P<indentation>\s*)'(?P<name>[^']*)':\s*\[$")
12 EXCLUSION_PATTERN = re.compile("^(?:README|OWNERS|.*\.(pyc?|sh|swp)|.*~)$") 12 EXCLUSION_PATTERN = re.compile("^(?:README|OWNERS|.*\.(pyc?|sh|swp)|.*~)$")
13 13
14 DATA_SOURCES_PATH_FOR_VARIABLES = { 14 DATA_SOURCES_PATH_FOR_VARIABLES = {
15 "net_test_support_data_sources": [ 15 "net_test_support_data_sources": [
16 "net/data/ssl/certificates", 16 "net/data/ssl/certificates",
17 "net/http/transport_security_state_static.json",
17 ], 18 ],
18 "net_unittests_data_sources": [ 19 "net_unittests_data_sources": [
19 "net/data/cert_issuer_source_aia_unittest", 20 "net/data/cert_issuer_source_aia_unittest",
20 "net/data/cert_issuer_source_static_unittest", 21 "net/data/cert_issuer_source_static_unittest",
21 "net/data/certificate_policies_unittest", 22 "net/data/certificate_policies_unittest",
22 "net/data/filter_unittests", 23 "net/data/filter_unittests",
23 "net/data/name_constraints_unittest", 24 "net/data/name_constraints_unittest",
24 "net/data/parse_certificate_unittest", 25 "net/data/parse_certificate_unittest",
25 "net/data/parse_ocsp_unittest", 26 "net/data/parse_ocsp_unittest",
26 "net/data/test.html", 27 "net/data/test.html",
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 data_sources_for_variables = {} 134 data_sources_for_variables = {}
134 for variable in DATA_SOURCES_PATH_FOR_VARIABLES: 135 for variable in DATA_SOURCES_PATH_FOR_VARIABLES:
135 data_sources_for_variables[variable] = list_data_sources( 136 data_sources_for_variables[variable] = list_data_sources(
136 root_dir, DATA_SOURCES_PATH_FOR_VARIABLES[variable], EXCLUSION_PATTERN) 137 root_dir, DATA_SOURCES_PATH_FOR_VARIABLES[variable], EXCLUSION_PATTERN)
137 138
138 edit_file(net_gypi, root_dir, data_sources_for_variables) 139 edit_file(net_gypi, root_dir, data_sources_for_variables)
139 140
140 141
141 if __name__ == "__main__": 142 if __name__ == "__main__":
142 sys.exit(main(sys.argv[1:])) 143 sys.exit(main(sys.argv[1:]))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698