Documentation

Overview

Package testtask implements a portable set of commands useful as stand-ins for user tasks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Path

func Path() string

Path returns the path to the currently running executable.

func Run

func Run() bool

Run interprets os.Args as a testtask script if the current program was launched with an environment configured by SetCmdEnv or SetTaskEnv. It returns false if the environment was not set by this package.

func SetCmdEnv

func SetCmdEnv(cmd *exec.Cmd)

SetCmdEnv configures the environment of cmd so that Run executes a testtask script when called from within cmd.

func SetTaskConfigEnv

func SetTaskConfigEnv(t *drivers.TaskConfig)

SetTaskConfigEnv configures the environment of t so that Run executes a testtask script when called from within t.

func SetTaskEnv

func SetTaskEnv(t *structs.Task)

SetTaskEnv configures the environment of t so that Run executes a testtask script when called from within t.

Types

This section is empty.