aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/build/testlinux.go
diff options
context:
space:
mode:
authorZubin Mithra <zsm@chromium.org>2019-10-08 15:57:52 -0700
committerDmitry Vyukov <dvyukov@google.com>2019-10-22 10:09:57 +0200
commita2bdbd8c37841cc507a2ad59f25d90d6467e5858 (patch)
treebc4ad0e738a749c2321b7181e4ea04c5615738e7 /pkg/build/testlinux.go
parent37dc03de04826cc0d5d1e3699832b0a3113d40af (diff)
pkg/bisect: add initial testing support for cause bisection
(note: incomplete change) Refactor existing code as follows: * Move reusable test utility functions from git_repo_test.go to pkg/vcs/test_util.go and make them exported. * Split Run() into Run()+runImpl(). * Change type of bisect.go:env.inst to `instance.BuilderTester`. Change usage inside syz-testbuild/testbuild.go accordingly. * Move most of linux.PreviousReleaseTags() into vcs/git.go as git.previousReleaseTags(). * Allow build.CompilerIdentity to be mocked. Introduce the following changes: * instance.BuilderTester is an interface with methods BuildSyzkaller() BuildKernel() Test() NewEnv() now returns this interface. * type testEnv implements instance.BuilderTester. * type testBuilder implements builder interface. Add a entry into table inside pkg/build/build.go:getBuilder() to return testBuilder object.
Diffstat (limited to 'pkg/build/testlinux.go')
-rw-r--r--pkg/build/testlinux.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/pkg/build/testlinux.go b/pkg/build/testlinux.go
new file mode 100644
index 000000000..482c162c5
--- /dev/null
+++ b/pkg/build/testlinux.go
@@ -0,0 +1,16 @@
+// 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 build
+
+// TypeBuilder implements the builder interface.
+type testBuilder struct{}
+
+func (tb testBuilder) build(targetArch, vmType, kernelDir, outputDir, compiler, userspaceDir,
+ cmdlineFile, sysctlFile string, config []byte) error {
+ return nil
+}
+
+func (tb testBuilder) clean(string, string) error {
+ return nil
+}