aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/tools/run_tests/sources_and_headers.json.template
blob: 04802772af50d362554c6f1426aed04515506411 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
%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)
                if not tgt.boringssl and not tgt.zlib],
               sort_keys=True, indent=2)}