]> Cypherpunks.ru repositories - gostls13.git/commitdiff
cmd/go: remove unused (*testgoData).runGit test helper
authorTobias Klauser <tklauser@distanz.ch>
Wed, 6 Sep 2023 09:31:56 +0000 (11:31 +0200)
committerTobias Klauser <tklauser@distanz.ch>
Wed, 25 Oct 2023 19:46:46 +0000 (19:46 +0000)
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>
src/cmd/go/go_test.go

index 3cb6131e8cb2b5df441cc35db660f32e8dc4c2fc..1c4374da4b02051dd99f5bbe84d68da6ed948105 100644 (file)
@@ -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.
 func (tg *testgoData) getStdout() string {
        tg.t.Helper()