smarttest

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 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 smarttest implements the smart_test tool.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(ctx context.Context, _ *mcp.CallToolRequest, args Params) (*mcp.CallToolResult, any, error)

Handler executes the smart_test tool.

func Register

func Register(server *mcp.Server)

Register registers the tool with the MCP server.

Types

type Params

type Params struct {
	Dir      string `json:"dir" jsonschema:"The absolute directory path to test in. Required."`
	Packages string `json:"packages,omitempty" jsonschema:"Packages to test (default: ./...)"`
	Level    string `json:"level,omitempty" jsonschema:"Testing depth: 'fast', 'basic', 'benchmark', 'complete'"`
	Run      string `json:"run,omitempty" jsonschema:"Regex pattern to filter tests/benchmarks (maps to -run or -bench)"`
}

Params defines the input parameters for smart_test.

type Runner

type Runner interface {
	Run(ctx context.Context, dir, name string, args ...string) error
	RunWithOutput(ctx context.Context, dir, name string, args ...string) (string, error)
	LookPath(file string) (string, error)
}

Runner defines the interface for running CLI commands.

var CommandRunner Runner = &stdRunner{}

CommandRunner is used for executing CLI commands during testing or runtime.

Jump to

Keyboard shortcuts

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