syzkaller/pkg/vcs/testos.go
Dmitry Vyukov 084e388155 pkg/vcs: make EnvForCommit return full compiler path
All callers of EnvForCommit need the compiler path,
so move this logic into EnvForCommit to avoid duplication.
Also simplifies tests because test impl can now return
an empty compiler (which should be unused).
2019-10-22 15:41:03 +02:00

23 lines
547 B
Go

// Copyright 2019 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
type testos struct {
*git
}
func newTestos(dir string) *testos {
return &testos{
git: newGit(dir, nil),
}
}
func (ctx *testos) PreviousReleaseTags(commit string) ([]string, error) {
return ctx.git.previousReleaseTags(commit, false)
}
func (ctx *testos) EnvForCommit(binDir, commit string, kernelConfig []byte) (*BisectEnv, error) {
return &BisectEnv{}, nil
}