diff options
author | Craig Tiller <ctiller@google.com> | 2015-08-31 15:53:36 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-08-31 15:53:36 -0700 |
commit | 1ebb7c885e55e16c8b65b7cb5c9ea08038cd67f4 (patch) | |
tree | a1267c94be1ca071ea393e889d84c13262ae4944 /templates/tools/run_tests | |
parent | e28e140afd0cb76de807375f28684e3d963931c4 (diff) |
Hand-written changes
Diffstat (limited to 'templates/tools/run_tests')
-rw-r--r-- | templates/tools/run_tests/sources_and_headers.json.template | 68 | ||||
-rw-r--r-- | templates/tools/run_tests/tests.json.template | 28 |
2 files changed, 50 insertions, 46 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)} diff --git a/templates/tools/run_tests/tests.json.template b/templates/tools/run_tests/tests.json.template index 63046731de..655976ac86 100644 --- a/templates/tools/run_tests/tests.json.template +++ b/templates/tools/run_tests/tests.json.template @@ -1,13 +1,15 @@ -<%! -import json -%> - -${json.dumps([{"name": tgt.name, - "language": tgt.language, - "platforms": tgt.platforms, - "ci_platforms": tgt.ci_platforms, - "exclude_configs": tgt.get("exclude_configs", []), - "flaky": tgt.flaky} - for tgt in targets - if tgt.get('run', True) and tgt.build == 'test'], - sort_keys=True, indent=2)} +%YAML 1.2 +--- | + <%! + import json + %> + + ${json.dumps([{"name": tgt.name, + "language": tgt.language, + "platforms": tgt.platforms, + "ci_platforms": tgt.ci_platforms, + "exclude_configs": tgt.get("exclude_configs", []), + "flaky": tgt.flaky} + for tgt in targets + if tgt.get('run', True) and tgt.build == 'test'], + sort_keys=True, indent=2)} |