def _RenderTestResourceId(spec):
  """Renders barebone resource_ids data based on |spec|."""
  data = '{"SRCDIR": ".",'
  for i, tok in enumerate(spec.split(',')):
    num_star = len(tok) - len(tok.lstrip('*'))
    tok = tok[num_star:]
    meta = '"META":{"join": %d},' % (num_star + 1) if num_star else ''
    start_id = tok.split('+')[0]  # Strip '+usage'.
    data += '"foo%d.grd": {%s"includes": [%s]},' % (i, meta, start_id)
  data += '}'
  return data