From: Austin Clements Date: Fri, 23 Sep 2022 21:23:54 +0000 (-0400) Subject: cmd/dist: eliminate registerSeqTest X-Git-Tag: go1.20rc1~220 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=40cb04c95bdf9a8da6aed8cfe8f32075e0ecc4ac;p=gostls13.git cmd/dist: eliminate registerSeqTest 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 Reviewed-by: Ian Lance Taylor Reviewed-by: Dmitri Shuralyov TryBot-Result: Gopher Robot --- diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go index b3c282a869..5558bc1819 100644 --- a/src/cmd/dist/test.go +++ b/src/cmd/dist/test.go @@ -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.