tests.json.template 1.1 KB

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