Documentation ¶
Index ¶
- func ExecuteT(t *testing.T, cmd, input string, envs []string) (stdout, stderr string)
- type Process
- func CreateProcess(dir string, name string, args []string, envs []string) (*Process, error)
- func GoExecuteT(t *testing.T, cmd string, envs []string) (proc *Process)
- func GoExecuteTWithStdout(t *testing.T, cmd string) (proc *Process)
- func StartProcess(dir string, name string, args []string, envs []string) (*Process, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Process ¶
type Process struct { ExecPath string Args []string EnvVars []string Pid int StartTime time.Time EndTime time.Time Cmd *exec.Cmd `json:"-"` ExitState *os.ProcessState `json:"-"` StdinPipe io.WriteCloser `json:"-"` StdoutPipe io.ReadCloser `json:"-"` StderrPipe io.ReadCloser `json:"-"` }
execution process
func CreateProcess ¶
Same as StartProcess but doesn't start the process
func GoExecuteT ¶
Execute the command, launch goroutines to log stdout/err to t. Caller should wait for .Wait() or .Stop() to terminate.
func GoExecuteTWithStdout ¶
Same as GoExecuteT but spawns a go routine to ReadAll off stdout.
func StartProcess ¶
dir: The working directory. If "", os.Getwd() is used. name: Command name args: Args to command. (should not include name)
Click to show internal directories.
Click to hide internal directories.