Debian Codegraph @

templates/tools/run_tests/generated/tests.json.template

raw
1 %YAML 1.2
2 --- |
3 <%!
4 import json
5
6 def gen_one_target(tgt):
7 out = {"name": tgt.name,
8 "language": tgt.language,
9 "platforms": tgt.platforms,
10 "ci_platforms": tgt.ci_platforms,
11 "gtest": tgt.gtest,
12 "benchmark": tgt.get("benchmark", False),
13 "exclude_configs": tgt.get("exclude_configs", []),
14 "exclude_iomgrs": tgt.get("exclude_iomgrs", []),
15 "args": tgt.get("args", []),
16 "flaky": tgt.flaky,
17 "cpu_cost": tgt.get("cpu_cost", 1.0),
18 "uses_polling": tgt.get("uses_polling", True)}
19 timeout_seconds = tgt.get("timeout_seconds", None)
20 if timeout_seconds:
21 out['timeout_seconds'] = timeout_seconds
22 excluded_poll_engines = tgt.get("excluded_poll_engines", None)
23 if excluded_poll_engines:
24 out['excluded_poll_engines'] = excluded_poll_engines
25 return out
26 %>
27
28 ${json.dumps([gen_one_target(tgt)
29 for tgt in targets
30 if tgt.get('run', True) and tgt.build == 'test'] +
31 tests,
32 sort_keys=True, indent=2)}