]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: eliminate registerSeqTest
authorAustin Clements <austin@google.com>
Fri, 23 Sep 2022 21:23:54 +0000 (17:23 -0400)
committerAustin Clements <austin@google.com>
Wed, 16 Nov 2022 19:00:16 +0000 (19:00 +0000)
This is unused, and eliminating it lets us simplify the whole
registerTest mechanism.

Preparation for #37486.

Change-Id: Ia6221e48192cd17775a5d662bdb389d67a9265bc
Reviewed-on: https://go-review.googlesource.com/c/go/+/448800
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/cmd/dist/test.go

index b3c282a8694b8d00c530986a65de6cb8ce4ecebf..5558bc1819c5921795faff66d1c3930470a4178c 100644 (file)
@@ -889,7 +889,7 @@ func (t *tester) isRegisteredTestName(testName string) bool {
        return false
 }
 
-func (t *tester) registerTest1(seq bool, name, dirBanner string, cmdline ...interface{}) {
+func (t *tester) registerTest(name, dirBanner string, cmdline ...interface{}) {
        bin, args := flattenCmdline(cmdline)
        if bin == "time" && !t.haveTime {
                bin, args = args[0], args[1:]
@@ -901,26 +901,12 @@ func (t *tester) registerTest1(seq bool, name, dirBanner string, cmdline ...inte
                name:    name,
                heading: dirBanner,
                fn: func(dt *distTest) error {
-                       if seq {
-                               t.runPending(dt)
-                               timelog("start", name)
-                               defer timelog("end", name)
-                               return t.dirCmd(filepath.Join(goroot, "src", dirBanner), bin, args).Run()
-                       }
                        t.addCmd(dt, filepath.Join(goroot, "src", dirBanner), bin, args)
                        return nil
                },
        })
 }
 
-func (t *tester) registerTest(name, dirBanner string, cmdline ...interface{}) {
-       t.registerTest1(false, name, dirBanner, cmdline...)
-}
-
-func (t *tester) registerSeqTest(name, dirBanner string, cmdline ...interface{}) {
-       t.registerTest1(true, name, dirBanner, cmdline...)
-}
-
 // bgDirCmd constructs a Cmd intended to be run in the background as
 // part of the worklist. The worklist runner will buffer its output
 // and replay it sequentially. The command will be run in dir.