Compare commits
No commits in common. "75dd8f4a5118e5a184d8b860f4825c37657ffeb9" and "793ac0071dea61382d8ae5e6517b97720add4774" have entirely different histories.
75dd8f4a51
...
793ac0071d
5
.github/workflows/e2e.yml
vendored
5
.github/workflows/e2e.yml
vendored
@ -3,9 +3,6 @@ name: E2E
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- dev
|
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- ".github/workflows/images-*"
|
- ".github/workflows/images-*"
|
||||||
- ".github/workflows/ubuntu.yml"
|
- ".github/workflows/ubuntu.yml"
|
||||||
@ -139,7 +136,7 @@ jobs:
|
|||||||
echo 'Type=oneshot' >> test.service
|
echo 'Type=oneshot' >> test.service
|
||||||
echo 'WorkingDirectory=/root/test' >> test.service
|
echo 'WorkingDirectory=/root/test' >> test.service
|
||||||
echo 'TimeoutStopSec=1' >> test.service
|
echo 'TimeoutStopSec=1' >> test.service
|
||||||
echo 'ExecStart=/usr/local/bin/out-of-tree kernel --no-container-cache autogen --threads=8 --max=64 --shuffle' >> test.service
|
echo 'ExecStart=/usr/local/bin/out-of-tree kernel --no-container-cache autogen --threads=8 --max=128 --shuffle' >> test.service
|
||||||
echo 'ExecStart=/usr/local/bin/out-of-tree pew --qemu-timeout=10m --threads=4 --include-internal-errors' >> test.service
|
echo 'ExecStart=/usr/local/bin/out-of-tree pew --qemu-timeout=10m --threads=4 --include-internal-errors' >> test.service
|
||||||
|
|
||||||
scp test.service root@$IP:/etc/systemd/system/test.service
|
scp test.service root@$IP:/etc/systemd/system/test.service
|
||||||
|
@ -37,7 +37,7 @@ func preload(q *qemu.System, ki distro.KernelInfo, pm PreloadModule,
|
|||||||
|
|
||||||
var workPath, cache string
|
var workPath, cache string
|
||||||
if pm.Path != "" {
|
if pm.Path != "" {
|
||||||
log.Debug().Msg("Use non-git path for preload module (no cache)")
|
log.Print("Use non-git path for preload module (no cache)")
|
||||||
workPath = pm.Path
|
workPath = pm.Path
|
||||||
} else if pm.Repo != "" {
|
} else if pm.Repo != "" {
|
||||||
workPath, cache, err = cloneOrPull(pm.Repo, ki)
|
workPath, cache, err = cloneOrPull(pm.Repo, ki)
|
||||||
@ -85,7 +85,7 @@ func buildAndInsmod(workPath string, q *qemu.System, ki distro.KernelInfo,
|
|||||||
|
|
||||||
output, err := q.CopyAndInsmod(af)
|
output, err := q.CopyAndInsmod(af)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Err(err).Msg(output)
|
log.Print(output)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
@ -147,7 +147,7 @@ func cloneOrPull(repo string, ki distro.KernelInfo) (workPath, cache string,
|
|||||||
|
|
||||||
err = w.Pull(&git.PullOptions{})
|
err = w.Pull(&git.PullOptions{})
|
||||||
if err != nil && err != git.NoErrAlreadyUpToDate {
|
if err != nil && err != git.NoErrAlreadyUpToDate {
|
||||||
log.Error().Err(err).Msgf("pull %s error", repo)
|
log.Print(repo, "pull error:", err)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
r, err = git.PlainClone(workPath, false, &git.CloneOptions{URL: repo})
|
r, err = git.PlainClone(workPath, false, &git.CloneOptions{URL: repo})
|
||||||
|
@ -336,14 +336,13 @@ func copyArtifactAndTest(slog zerolog.Logger, q *qemu.System, ka Artifact,
|
|||||||
slog.Error().Err(err).Msg(res.Test.Output)
|
slog.Error().Err(err).Msg(res.Test.Output)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
slog.Info().Msgf("\n%v\n", res.Test.Output)
|
||||||
res.Run.Ok = true
|
res.Run.Ok = true
|
||||||
res.Test.Ok = true
|
res.Test.Ok = true
|
||||||
default:
|
default:
|
||||||
slog.Fatal().Msg("Unsupported artifact type")
|
slog.Fatal().Msg("Unsupported artifact type")
|
||||||
}
|
}
|
||||||
|
|
||||||
slog.Info().Msgf("\n%v\n", res.Test.Output)
|
|
||||||
|
|
||||||
_, err = q.Command("root", "echo")
|
_, err = q.Command("root", "echo")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
slog.Error().Err(err).Msg("after-test ssh reconnect")
|
slog.Error().Err(err).Msg("after-test ssh reconnect")
|
||||||
|
10
cmd/debug.go
10
cmd/debug.go
@ -45,7 +45,7 @@ type DebugCmd struct {
|
|||||||
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 {
|
||||||
log.Error().Err(err).Msg("read kernel config")
|
log.Print(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
var configPath string
|
var configPath string
|
||||||
@ -161,14 +161,14 @@ func (cmd *DebugCmd) Run(g *Globals) (err error) {
|
|||||||
// Module depends on one of the standard modules
|
// Module depends on one of the standard modules
|
||||||
err = artifact.CopyStandardModules(q, ki)
|
err = artifact.CopyStandardModules(q, ki)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Err(err).Msg("copy standard modules")
|
log.Print(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
err = artifact.PreloadModules(q, ka, ki, g.Config.Docker.Timeout.Duration)
|
err = artifact.PreloadModules(q, ka, ki, g.Config.Docker.Timeout.Duration)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Err(err).Msg("preload modules")
|
log.Print(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,7 +182,7 @@ func (cmd *DebugCmd) Run(g *Globals) (err error) {
|
|||||||
} else {
|
} 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)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Err(err).Msg(output)
|
log.Print(err, output)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,7 +206,7 @@ func (cmd *DebugCmd) Run(g *Globals) (err error) {
|
|||||||
}
|
}
|
||||||
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.Error().Err(err).Msgf("copy %s -> %s", f.Local, f.Remote)
|
log.Print("error copy err:", err, f.Local, f.Remote)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -263,7 +263,7 @@ func (cmd *KernelCmd) Generate(g *Globals, km artifact.Target) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if cmd.stats.success >= cmd.Max {
|
if cmd.stats.success >= cmd.Max {
|
||||||
log.Info().Msg("Max is reached")
|
log.Print("Max is reached")
|
||||||
swg.Done()
|
swg.Done()
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ func (cmd *LogQueryCmd) Run(g *Globals) (err error) {
|
|||||||
|
|
||||||
ka, kaErr := artifact.Artifact{}.Read(g.WorkDir + "/.out-of-tree.toml")
|
ka, kaErr := artifact.Artifact{}.Read(g.WorkDir + "/.out-of-tree.toml")
|
||||||
if kaErr == nil {
|
if kaErr == nil {
|
||||||
log.Debug().Msg(".out-of-tree.toml found, filter by artifact name")
|
log.Print(".out-of-tree.toml found, filter by artifact name")
|
||||||
les, err = getAllArtifactLogs(db, cmd.Tag, cmd.Num, ka)
|
les, err = getAllArtifactLogs(db, cmd.Tag, cmd.Num, ka)
|
||||||
} else {
|
} else {
|
||||||
les, err = getAllLogs(db, cmd.Tag, cmd.Num)
|
les, err = getAllLogs(db, cmd.Tag, cmd.Num)
|
||||||
|
@ -33,7 +33,7 @@ type PackCmd struct {
|
|||||||
|
|
||||||
func (cmd *PackCmd) Run(g *Globals) (err error) {
|
func (cmd *PackCmd) Run(g *Globals) (err error) {
|
||||||
tag := fmt.Sprintf("pack_run_%d", time.Now().Unix())
|
tag := fmt.Sprintf("pack_run_%d", time.Now().Unix())
|
||||||
log.Info().Msgf("Tag: %s", tag)
|
log.Print("Tag:", tag)
|
||||||
|
|
||||||
files, err := os.ReadDir(g.WorkDir)
|
files, err := os.ReadDir(g.WorkDir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -65,7 +65,7 @@ func (cmd *PackCmd) Run(g *Globals) (err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Info().Msg(f.Name())
|
log.Print(f.Name())
|
||||||
|
|
||||||
pew := PewCmd{
|
pew := PewCmd{
|
||||||
Max: cmd.KernelRuns,
|
Max: cmd.KernelRuns,
|
||||||
|
@ -34,7 +34,7 @@ func GenHostKernels(download bool) (kernels []distro.KernelInfo, err error) {
|
|||||||
|
|
||||||
rawOutput, err := cmd.CombinedOutput()
|
rawOutput, err := cmd.CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Err(err).Msg(string(rawOutput))
|
log.Print(string(rawOutput), err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ func GenHostKernels(download bool) (kernels []distro.KernelInfo, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
vmlinux := "/usr/lib/debug/boot/vmlinux-" + krel
|
vmlinux := "/usr/lib/debug/boot/vmlinux-" + krel
|
||||||
log.Info().Msgf("vmlinux %s", vmlinux)
|
log.Print("vmlinux", vmlinux)
|
||||||
if fs.PathExists(vmlinux) {
|
if fs.PathExists(vmlinux) {
|
||||||
ki.VmlinuxPath = vmlinux
|
ki.VmlinuxPath = vmlinux
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user