Fix a bug of getting wrong "GOROOT" in test.

It was introduced by one of my PR a few weeks ago, and I didn't find it out until when the GOROOT value is not set.