feat: realtime output
This commit is contained in:
@ -24,6 +24,15 @@ type ContainerCmd struct {
|
||||
Update ContainerUpdateCmd `cmd:"" help:"update containers"`
|
||||
Save ContainerSaveCmd `cmd:"" help:"save containers"`
|
||||
Cleanup ContainerCleanupCmd `cmd:"" help:"cleanup containers"`
|
||||
|
||||
RealtimeOutput RealtimeContainerOutputFlag `help:"show realtime output"`
|
||||
}
|
||||
|
||||
type RealtimeContainerOutputFlag bool
|
||||
|
||||
func (f RealtimeContainerOutputFlag) AfterApply() (err error) {
|
||||
container.Stdout = bool(f)
|
||||
return
|
||||
}
|
||||
|
||||
func (cmd ContainerCmd) Containers() (diis []container.Image, err error) {
|
||||
|
@ -193,7 +193,8 @@ func (cmd *DebugCmd) Run(g *Globals) (err error) {
|
||||
return
|
||||
}
|
||||
} else {
|
||||
buildDir, outFile, output, err = artifact.Build(log.Logger, tmp, ka, ki, g.Config.Docker.Timeout.Duration)
|
||||
buildDir, outFile, output, err = artifact.Build(
|
||||
log.Logger, tmp, ka, ki, g.Config.Docker.Timeout.Duration, false)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg(output)
|
||||
return
|
||||
|
@ -39,6 +39,8 @@ type KernelCmd struct {
|
||||
|
||||
ContainerTimeout time.Duration `help:"container timeout"`
|
||||
|
||||
RealtimeOutput RealtimeContainerOutputFlag `help:"show realtime output"`
|
||||
|
||||
List KernelListCmd `cmd:"" help:"list kernels"`
|
||||
ListRemote KernelListRemoteCmd `cmd:"" help:"list remote kernels"`
|
||||
Autogen KernelAutogenCmd `cmd:"" help:"generate kernels based on the current config"`
|
||||
|
@ -88,6 +88,7 @@ type PewCmd struct {
|
||||
IncludeInternalErrors bool `help:"count internal errors as part of the success rate"`
|
||||
|
||||
OutputOnSuccess bool `help:"show output on success"`
|
||||
RealtimeOutput bool `help:"show realtime output"`
|
||||
|
||||
Endless bool `help:"endless tests"`
|
||||
EndlessTimeout time.Duration `help:"timeout between tests" default:"1m"`
|
||||
@ -447,7 +448,7 @@ func (cmd PewCmd) testArtifact(swg *sizedwaitgroup.SizedWaitGroup,
|
||||
Str("kernel", ki.KernelRelease).
|
||||
Logger()
|
||||
|
||||
ka.Process(slog, ki, cmd.OutputOnSuccess,
|
||||
ka.Process(slog, ki, cmd.OutputOnSuccess, cmd.RealtimeOutput,
|
||||
cmd.Endless, cmd.Binary, cmd.EndlessStress, cmd.EndlessTimeout,
|
||||
func(q *qemu.System, ka artifact.Artifact, ki distro.KernelInfo, result *artifact.Result) {
|
||||
dumpResult(q, ka, ki, result, cmd.Dist, cmd.Tag, cmd.Binary, cmd.DB)
|
||||
|
Reference in New Issue
Block a user