testfixture

package
v2.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 21 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

Prepare acquires the isolated executable environment for one attempt.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL