aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/tools/run_tests/sources_and_headers.json.template
diff options
context:
space:
mode:
Diffstat (limited to 'templates/tools/run_tests/sources_and_headers.json.template')
-rw-r--r--templates/tools/run_tests/sources_and_headers.json.template68
1 files changed, 35 insertions, 33 deletions
diff --git a/templates/tools/run_tests/sources_and_headers.json.template b/templates/tools/run_tests/sources_and_headers.json.template
index 1c0e04283a..6f51ed7323 100644
--- a/templates/tools/run_tests/sources_and_headers.json.template
+++ b/templates/tools/run_tests/sources_and_headers.json.template
@@ -1,33 +1,35 @@
-<%!
-import json
-import os
-
-def proto_headers(src):
- out = []
- for f in src:
- name, ext = os.path.splitext(f)
- if ext == '.proto':
- out.extend(fmt % name for fmt in ['%s.grpc.pb.h', '%s.pb.h'])
- return out
-
-def no_protos(src):
- out = []
- for f in src:
- if os.path.splitext(f)[1] != '.proto':
- out.append(f)
- return out
-%>
-
-${json.dumps([{"name": tgt.name,
- "language": tgt.language,
- "src": sorted(
- no_protos(tgt.src) +
- tgt.get('public_headers', []) +
- tgt.get('headers', [])),
- "headers": sorted(
- tgt.get('public_headers', []) +
- tgt.get('headers', []) +
- proto_headers(tgt.src)),
- "deps": sorted(tgt.get('deps', []))}
- for tgt in (targets + libs)],
- sort_keys=True, indent=2)}
+%YAML 1.2
+--- |
+ <%!
+ import json
+ import os
+
+ def proto_headers(src):
+ out = []
+ for f in src:
+ name, ext = os.path.splitext(f)
+ if ext == '.proto':
+ out.extend(fmt % name for fmt in ['%s.grpc.pb.h', '%s.pb.h'])
+ return out
+
+ def no_protos(src):
+ out = []
+ for f in src:
+ if os.path.splitext(f)[1] != '.proto':
+ out.append(f)
+ return out
+ %>
+
+ ${json.dumps([{"name": tgt.name,
+ "language": tgt.language,
+ "src": sorted(
+ no_protos(tgt.src) +
+ tgt.get('public_headers', []) +
+ tgt.get('headers', [])),
+ "headers": sorted(
+ tgt.get('public_headers', []) +
+ tgt.get('headers', []) +
+ proto_headers(tgt.src)),
+ "deps": sorted(tgt.get('deps', []))}
+ for tgt in (targets + libs)],
+ sort_keys=True, indent=2)}