Documentation
¶
Overview ¶
Package testfixture provides executable application hosts for eval contract tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComponentBindings ¶
type ComponentBindings struct {
// Build identifies the compiler, dependency contract and exact executable bytes.
Build *eval.PreparedBuild
// Toolsets contains the isolated real skill and helper registrations, in that order.
Toolsets []runtime.ToolsetRegistration
}
ComponentBindings retains installation identity and toolsets for one host directory.
func InstallComponentBindings ¶
func InstallComponentBindings(ctx context.Context, dir string, source, skill []byte) (ComponentBindings, error)
InstallComponentBindings installs exact helper/skill bytes without registering a solver. The caller supplies a fresh existing directory and retains cleanup ownership on error.
type ComponentHost ¶
type ComponentHost struct {
// contains filtered or unexported fields
}
ComponentHost installs a frozen skill and compiles its submitted Go helper. It is an application fixture, not a sandbox for untrusted source.
func NewComponentHost ¶
func NewComponentHost(frozen *candidate.Frozen) *ComponentHost
NewComponentHost binds one immutable candidate to its application host.
func (*ComponentHost) Directory ¶
func (h *ComponentHost) Directory() string
Directory returns the environment path, including after it has been released.
func (*ComponentHost) ModelCalls ¶
func (h *ComponentHost) ModelCalls() int
ModelCalls reports requests dispatched to the deterministic solver provider.
func (*ComponentHost) Prepare ¶
func (h *ComponentHost) Prepare(ctx context.Context, info eval.PreparedAttemptInfo) (*eval.PreparedAttempt, error)
Prepare acquires the isolated executable environment for one attempt.