mirror of
https://github.com/golang/go
synced 2024-11-26 20:51:23 -07:00
cmd/go: remove unused (*testgoData).runGit test helper
It's unused since CL 518775. Change-Id: I81a4865d0c656ca2b968d51e52388c88e661a157 Reviewed-on: https://go-review.googlesource.com/c/go/+/537595 Reviewed-by: Bryan Mills <bcmills@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
57322b3cbf
commit
37788b8b9e
@ -579,31 +579,6 @@ func (tg *testgoData) runFail(args ...string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// runGit runs a git command, and expects it to succeed.
|
|
||||||
func (tg *testgoData) runGit(dir string, args ...string) {
|
|
||||||
tg.t.Helper()
|
|
||||||
cmd := testenv.Command(tg.t, "git", args...)
|
|
||||||
tg.stdout.Reset()
|
|
||||||
tg.stderr.Reset()
|
|
||||||
cmd.Stdout = &tg.stdout
|
|
||||||
cmd.Stderr = &tg.stderr
|
|
||||||
cmd.Dir = dir
|
|
||||||
cmd.Env = tg.env
|
|
||||||
status := cmd.Run()
|
|
||||||
if tg.stdout.Len() > 0 {
|
|
||||||
tg.t.Log("git standard output:")
|
|
||||||
tg.t.Log(tg.stdout.String())
|
|
||||||
}
|
|
||||||
if tg.stderr.Len() > 0 {
|
|
||||||
tg.t.Log("git standard error:")
|
|
||||||
tg.t.Log(tg.stderr.String())
|
|
||||||
}
|
|
||||||
if status != nil {
|
|
||||||
tg.t.Logf("git %v failed unexpectedly: %v", args, status)
|
|
||||||
tg.t.FailNow()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// getStdout returns standard output of the testgo run as a string.
|
// getStdout returns standard output of the testgo run as a string.
|
||||||
func (tg *testgoData) getStdout() string {
|
func (tg *testgoData) getStdout() string {
|
||||||
tg.t.Helper()
|
tg.t.Helper()
|
||||||
|
Loading…
Reference in New Issue
Block a user