gotest: avoid using echo inside $()

The handling of newlines is not portable between bash and ksh.

Change-Id: I31cf57c9b2bcf98e8390ab92b75565a6798872de
Reviewed-on: https://go-review.googlesource.com/c/164597
Reviewed-by: Cherry Zhang <cherryyz@google.com>
1 file changed