Compare commits
No commits in common. "77547cedce852cf624b50603821709c11da0355c" and "c53e0cc99bf794ccbb326c0dad788befad1a6c06" have entirely different histories.
77547cedce
...
c53e0cc99b
2
.github/workflows/e2e.yml
vendored
2
.github/workflows/e2e.yml
vendored
@ -125,7 +125,7 @@ jobs:
|
|||||||
echo 'distro = { id = "${{ matrix.os.distro }}", release = "${{ matrix.os.release }}" }' >> examples/kernel-module/.out-of-tree.toml
|
echo 'distro = { id = "${{ matrix.os.distro }}", release = "${{ matrix.os.release }}" }' >> examples/kernel-module/.out-of-tree.toml
|
||||||
echo 'kernel = { regex = ".*" }' >> examples/kernel-module/.out-of-tree.toml
|
echo 'kernel = { regex = ".*" }' >> examples/kernel-module/.out-of-tree.toml
|
||||||
echo '[qemu]' >> examples/kernel-module/.out-of-tree.toml
|
echo '[qemu]' >> examples/kernel-module/.out-of-tree.toml
|
||||||
echo 'timeout = "5m"' >> examples/kernel-module/.out-of-tree.toml
|
echo 'timeout = "3m"' >> examples/kernel-module/.out-of-tree.toml
|
||||||
echo 'after_start_timeout = "10s"' >> examples/kernel-module/.out-of-tree.toml
|
echo 'after_start_timeout = "10s"' >> examples/kernel-module/.out-of-tree.toml
|
||||||
|
|
||||||
echo 'modprobe uio || modprobe 9p || modprobe xfs' >> examples/kernel-module/test.sh
|
echo 'modprobe uio || modprobe 9p || modprobe xfs' >> examples/kernel-module/test.sh
|
||||||
|
@ -338,11 +338,7 @@ func (ka Artifact) Process(slog zerolog.Logger, ki distro.KernelInfo,
|
|||||||
slog.Debug().Str("duration", time.Since(start).String()).
|
slog.Debug().Str("duration", time.Since(start).String()).
|
||||||
Msg("build done")
|
Msg("build done")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if !realtimeOutput {
|
slog.Error().Err(err).Msgf("build failure\n%v\n", result.Build.Output)
|
||||||
slog.Error().Err(err).Msgf("build failure\n%v\n", result.Build.Output)
|
|
||||||
} else {
|
|
||||||
slog.Error().Err(err).Msg("build failure")
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
if outputOnSuccess && !realtimeOutput {
|
if outputOnSuccess && !realtimeOutput {
|
||||||
@ -371,8 +367,6 @@ func (ka Artifact) Process(slog zerolog.Logger, ki distro.KernelInfo,
|
|||||||
ka.Qemu.Timeout.Duration = time.Minute
|
ka.Qemu.Timeout.Duration = time.Minute
|
||||||
}
|
}
|
||||||
|
|
||||||
slog.Info().Msg("wait for vm initialisation")
|
|
||||||
|
|
||||||
err = q.WaitForSSH(ka.Qemu.Timeout.Duration)
|
err = q.WaitForSSH(ka.Qemu.Timeout.Duration)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
result.InternalError = err
|
result.InternalError = err
|
||||||
@ -425,15 +419,14 @@ func (ka Artifact) Process(slog zerolog.Logger, ki distro.KernelInfo,
|
|||||||
}
|
}
|
||||||
|
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
slog.Info().Msg("copy artifact and run test")
|
|
||||||
copyArtifactAndTest(slog, q, ka, &result, remoteTest, outputOnSuccess, realtimeOutput)
|
copyArtifactAndTest(slog, q, ka, &result, remoteTest, outputOnSuccess, realtimeOutput)
|
||||||
slog.Debug().Str("duration", time.Since(start).String()).
|
slog.Debug().Str("duration", time.Since(start).String()).
|
||||||
Msgf("test completed (success: %v)", result.Test.Ok)
|
Msgf("test completed (success: %v)", result.Test.Ok)
|
||||||
|
|
||||||
if result.Build.Ok && !realtimeOutput {
|
if result.Build.Ok {
|
||||||
if !result.Run.Ok || !result.Test.Ok {
|
if !result.Run.Ok || !result.Test.Ok {
|
||||||
slog.Error().Msgf("qemu output\n%v\n", qemuTestOutput)
|
slog.Error().Msgf("qemu output\n%v\n", qemuTestOutput)
|
||||||
} else if outputOnSuccess {
|
} else if outputOnSuccess && !realtimeOutput {
|
||||||
slog.Info().Msgf("qemu output\n%v\n", qemuTestOutput)
|
slog.Info().Msgf("qemu output\n%v\n", qemuTestOutput)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -352,11 +352,7 @@ func copyArtifactAndTest(slog zerolog.Logger, q *qemu.System, ka Artifact,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if err != nil || !res.Test.Ok {
|
if err != nil || !res.Test.Ok {
|
||||||
if !realtimeOutput {
|
slog.Error().Err(err).Msgf("test error\n%v\n", res.Test.Output)
|
||||||
slog.Error().Err(err).Msgf("test failure\n%v\n", res.Test.Output)
|
|
||||||
} else {
|
|
||||||
slog.Error().Err(err).Msg("test failure")
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,11 +198,9 @@ func (c Client) PushRepo(repo api.Repo) (err error) {
|
|||||||
remote := fmt.Sprintf("git://%s/%s", addr, repo.Name)
|
remote := fmt.Sprintf("git://%s/%s", addr, repo.Name)
|
||||||
log.Debug().Msgf("git proxy remote: %v", remote)
|
log.Debug().Msgf("git proxy remote: %v", remote)
|
||||||
|
|
||||||
raw, err := exec.Command("git", "-c", "push.default=current",
|
raw, err := exec.Command("git", "--work-tree", repo.Path, "push", "--force", remote).
|
||||||
"--work-tree", repo.Path, "push", "--force", remote).
|
|
||||||
CombinedOutput()
|
CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Msgf("push repo %v\n%v", repo, string(raw))
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
16
cmd/log.go
16
cmd/log.go
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2024 Mikhail Klementev. All rights reserved.
|
// Copyright 2023 Mikhail Klementev. All rights reserved.
|
||||||
// Use of this source code is governed by a AGPLv3 license
|
// Use of this source code is governed by a AGPLv3 license
|
||||||
// (or later) that can be found in the LICENSE file.
|
// (or later) that can be found in the LICENSE file.
|
||||||
|
|
||||||
@ -212,12 +212,7 @@ func center(s string, w int) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func genOkFailCentered(name string, ok bool) (aurv aurora.Value) {
|
func genOkFailCentered(name string, ok bool) (aurv aurora.Value) {
|
||||||
if ok {
|
name = center(name, 10)
|
||||||
name += " OK"
|
|
||||||
} else {
|
|
||||||
name += " FAIL"
|
|
||||||
}
|
|
||||||
name = center(name, 14)
|
|
||||||
if ok {
|
if ok {
|
||||||
aurv = aurora.BgGreen(aurora.Black(name))
|
aurv = aurora.BgGreen(aurora.Black(name))
|
||||||
} else {
|
} else {
|
||||||
@ -230,7 +225,7 @@ func logLogEntry(l logEntry) {
|
|||||||
distroInfo := fmt.Sprintf("%s-%s {%s}", l.Distro.ID,
|
distroInfo := fmt.Sprintf("%s-%s {%s}", l.Distro.ID,
|
||||||
l.Distro.Release, l.KernelRelease)
|
l.Distro.Release, l.KernelRelease)
|
||||||
|
|
||||||
artifactInfo := fmt.Sprintf("%s", l.Name)
|
artifactInfo := fmt.Sprintf("{[%s] %s}", l.Type, l.Name)
|
||||||
|
|
||||||
timestamp := l.Timestamp.Format("2006-01-02 15:04")
|
timestamp := l.Timestamp.Format("2006-01-02 15:04")
|
||||||
|
|
||||||
@ -262,10 +257,7 @@ func logLogEntry(l logEntry) {
|
|||||||
additional = "(timeout)"
|
additional = "(timeout)"
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(distroInfo) > 40 {
|
colored := aurora.Sprintf("[%4d %4s] [%s] %s %-70s: %s %s",
|
||||||
distroInfo = distroInfo[:40]
|
|
||||||
}
|
|
||||||
colored := aurora.Sprintf("[%4d %4s] [%s] %s %-40s: %s %s",
|
|
||||||
l.ID, l.Tag, timestamp, artifactInfo, distroInfo, status,
|
l.ID, l.Tag, timestamp, artifactInfo, distroInfo, status,
|
||||||
additional)
|
additional)
|
||||||
|
|
||||||
|
@ -168,11 +168,6 @@ func (cmd *PewCmd) Run(g *Globals) (err error) {
|
|||||||
cmd.useRemote = g.Remote
|
cmd.useRemote = g.Remote
|
||||||
cmd.remoteAddr = g.RemoteAddr
|
cmd.remoteAddr = g.RemoteAddr
|
||||||
|
|
||||||
if cmd.RealtimeOutput && cmd.Threads != 1 {
|
|
||||||
log.Warn().Msg("realtime output disables multithreading")
|
|
||||||
cmd.Threads = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if cmd.useRemote {
|
if cmd.useRemote {
|
||||||
c := client.Client{RemoteAddr: cmd.remoteAddr}
|
c := client.Client{RemoteAddr: cmd.remoteAddr}
|
||||||
cmd.Kcfg.Kernels, err = c.Kernels()
|
cmd.Kcfg.Kernels, err = c.Kernels()
|
||||||
|
Loading…
Reference in New Issue
Block a user