normpath

package
v0.0.0-...-1dd1f65 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package normpath contains various 'normalised path' fragments, and functions for constructing them. These are used by both the normaliser (which rewrites a plan to use normalised paths) and various other parts of the tooling (which assumes the use of normalised paths).

Index

Constants

View Source
const (
	// FileBin is the normalised name for output binaries.
	FileBin = "a.out"
	// FileCompileLog is the normalised name for compilation logs.
	FileCompileLog = "compile.log"
	// FileOrigLitmus is the normalised name for pre-fuzz litmus tests.
	FileOrigLitmus = "orig.litmus"
	// FileFuzzLitmus is the normalised name for post-fuzz litmus tests.
	FileFuzzLitmus = "fuzz.litmus"
	// FileFuzzTrace is the normalised name for fuzzer traces.
	FileFuzzTrace = "fuzz.trace"
	// DirCompiles is the normalised directory for compile results.
	DirCompiles = "compiles"
	// DirRecipes is the normalised directory for recipe results.
	DirRecipes = "recipes"

	// TarSuffix is the extension used by the saver when saving tarballs, and presumed by archive-transparent file readers.
	TarSuffix = ".tar.gz"
)

Variables

View Source
var ErrMissingFile = errors.New("subject file not available")

ErrMissingFile occurs when we request a subject file but it isn't available.

Functions

func ReadSubjectFile

func ReadSubjectFile(root, path string) ([]byte, error)

ReadSubjectFile is a low-level function for reading a subject file with path path, relative to directory root.

If the file is present on disk at root/path, this behaves like os.ReadFile. Otherwise, if the path starts with a directory DIR, it assumes that a file root/DIR.tar.gz exists containing path, and attempts to load the file from there. (This is the convention used by the saver when saving tarballs of subjects.)

path may be a slashpath.

func RecipeDir

func RecipeDir(root, arch string) string

RecipeDir gets the normalised recipe directory under root and for architecture ID-string arch.

Types

This section is empty.

Jump to

Keyboard shortcuts

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