infra_test.py: Suggest "go get" for more types of errors

Bug: skia:7384
Change-Id: Ifcb19c864d422781d6023606406ac2b7dd23b0f8
Reviewed-on: https://skia-review.googlesource.com/84121
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
This commit is contained in:
Eric Boren 2017-12-12 13:20:25 -05:00 committed by Skia Commit-Bot
parent d3fbe70d3e
commit 543de8f8a6

View File

@ -52,9 +52,11 @@ def gen_tasks_test(train):
except OSError:
return ('Failed to run "%s"; do you have Go installed on your machine?'
% ' '.join(cmd))
if output and 'cannot find package "go.skia.org/infra' in output:
return ('Failed to run gen_tests.go:\n\n%s\nMaybe you need to run:\n\n'
'$ go get -u go.skia.org/infra/...' % output)
if output:
if ('cannot find package "go.skia.org/infra' in output or
'gen_tasks.go:' in output):
return ('Failed to run gen_tests.go:\n\n%s\nMaybe you need to run:\n\n'
'$ go get -u go.skia.org/infra/...' % output)
return output