mirror of
https://github.com/reactos/syzkaller.git
synced 2025-02-20 03:21:26 +00:00
pkg/vcs: add akaros support
This commit is contained in:
parent
3a35170a24
commit
8ebdf5923d
61
pkg/vcs/akaros.go
Normal file
61
pkg/vcs/akaros.go
Normal file
@ -0,0 +1,61 @@
|
||||
// Copyright 2018 syzkaller project authors. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
|
||||
package vcs
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
type akaros struct {
|
||||
git *git
|
||||
dropbear *git
|
||||
}
|
||||
|
||||
func newAkaros(vm, dir string) *akaros {
|
||||
return &akaros{
|
||||
git: newGit("", vm, dir),
|
||||
dropbear: newGit("", vm, filepath.Join(dir, "dropbear")),
|
||||
}
|
||||
}
|
||||
|
||||
func (ctx *akaros) Poll(repo, branch string) (*Commit, error) {
|
||||
if _, err := ctx.dropbear.Poll("https://github.com/akaros/dropbear-akaros", "akaros"); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ctx.git.Poll(repo, branch)
|
||||
}
|
||||
|
||||
func (ctx *akaros) CheckoutBranch(repo, branch string) (*Commit, error) {
|
||||
return nil, fmt.Errorf("not implemented for akaros")
|
||||
}
|
||||
|
||||
func (ctx *akaros) CheckoutCommit(repo, commit string) (*Commit, error) {
|
||||
return nil, fmt.Errorf("not implemented for akaros")
|
||||
}
|
||||
|
||||
func (ctx *akaros) SwitchCommit(commit string) (*Commit, error) {
|
||||
return nil, fmt.Errorf("not implemented for akaros")
|
||||
}
|
||||
|
||||
func (ctx *akaros) HeadCommit() (*Commit, error) {
|
||||
return nil, fmt.Errorf("not implemented for akaros")
|
||||
}
|
||||
|
||||
func (ctx *akaros) ListRecentCommits(baseCommit string) ([]string, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (ctx *akaros) ExtractFixTagsFromCommits(baseCommit, email string) ([]FixCommit, error) {
|
||||
return nil, fmt.Errorf("not implemented for akaros")
|
||||
}
|
||||
|
||||
func (ctx *akaros) Bisect(bad, good string, trace io.Writer, pred func() (BisectResult, error)) (*Commit, error) {
|
||||
return nil, fmt.Errorf("not implemented for akaros")
|
||||
}
|
||||
|
||||
func (ctx *akaros) PreviousReleaseTags(commit string) ([]string, error) {
|
||||
return nil, fmt.Errorf("not implemented for akaros")
|
||||
}
|
@ -77,6 +77,8 @@ func NewRepo(os, vm, dir string) (Repo, error) {
|
||||
switch os {
|
||||
case "linux":
|
||||
return newGit(os, vm, dir), nil
|
||||
case "akaros":
|
||||
return newAkaros(vm, dir), nil
|
||||
case "fuchsia":
|
||||
return newFuchsia(vm, dir), nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user