mirror of
https://github.com/golang/go
synced 2024-11-17 10:04:43 -07:00
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 <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>
This commit is contained in:
parent
9c40230517
commit
40cb04c95b
16
src/cmd/dist/test.go
vendored
16
src/cmd/dist/test.go
vendored
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user