mirror of https://github.com/golang/go.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 <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
|
|
@ -889,7 +889,7 @@ func (t *tester) isRegisteredTestName(testName string) bool {
|
||||||
return false
|
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)
|
bin, args := flattenCmdline(cmdline)
|
||||||
if bin == "time" && !t.haveTime {
|
if bin == "time" && !t.haveTime {
|
||||||
bin, args = args[0], args[1:]
|
bin, args = args[0], args[1:]
|
||||||
|
|
@ -901,26 +901,12 @@ func (t *tester) registerTest1(seq bool, name, dirBanner string, cmdline ...inte
|
||||||
name: name,
|
name: name,
|
||||||
heading: dirBanner,
|
heading: dirBanner,
|
||||||
fn: func(dt *distTest) error {
|
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)
|
t.addCmd(dt, filepath.Join(goroot, "src", dirBanner), bin, args)
|
||||||
return nil
|
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
|
// bgDirCmd constructs a Cmd intended to be run in the background as
|
||||||
// part of the worklist. The worklist runner will buffer its output
|
// part of the worklist. The worklist runner will buffer its output
|
||||||
// and replay it sequentially. The command will be run in dir.
|
// and replay it sequentially. The command will be run in dir.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue