Treat test files as relative to build directory
This commit is contained in:
parent
b0587a4ade
commit
870fe202b7
6
debug.go
6
debug.go
@ -36,6 +36,7 @@ type DebugCmd struct {
|
|||||||
NoKpti bool `help:"Disable KPTI"`
|
NoKpti bool `help:"Disable KPTI"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: merge with pew.go
|
||||||
func (cmd *DebugCmd) Run(g *Globals) (err error) {
|
func (cmd *DebugCmd) Run(g *Globals) (err error) {
|
||||||
kcfg, err := config.ReadKernelConfig(g.Config.Kernels)
|
kcfg, err := config.ReadKernelConfig(g.Config.Kernels)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -161,7 +162,7 @@ func (cmd *DebugCmd) Run(g *Globals) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
_, outFile, output, err := build(tmp, ka, ki, g.Config.Docker.Timeout.Duration)
|
buildDir, outFile, output, err := build(tmp, ka, ki, g.Config.Docker.Timeout.Duration)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err, output)
|
log.Println(err, output)
|
||||||
return
|
return
|
||||||
@ -179,6 +180,9 @@ func (cmd *DebugCmd) Run(g *Globals) (err error) {
|
|||||||
|
|
||||||
// Copy all test files to the remote machine
|
// Copy all test files to the remote machine
|
||||||
for _, f := range ka.TestFiles {
|
for _, f := range ka.TestFiles {
|
||||||
|
if f.Local[0] != '/' {
|
||||||
|
f.Local = buildDir + "/" + f.Local
|
||||||
|
}
|
||||||
err = q.CopyFile(f.User, f.Local, f.Remote)
|
err = q.CopyFile(f.User, f.Local, f.Remote)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("error copy err:", err, f.Local, f.Remote)
|
log.Println("error copy err:", err, f.Local, f.Remote)
|
||||||
|
Loading…
Reference in New Issue
Block a user