MCPcopy Create free account
hub / github.com/baidu/EasyFaaS / helperCommandContext

Function helperCommandContext

pkg/funclet/command/command_test.go:39–51  ·  view source on GitHub ↗
(t *testing.T, ctx context.Context, s ...string)

Source from the content-addressed store, hash-verified

37)
38
39func helperCommandContext(t *testing.T, ctx context.Context, s ...string) (cmd *exec.Cmd) {
40 testenv.MustHaveExec(t)
41
42 cs := []string{"-test.run=TestHelperProcess", "--"}
43 cs = append(cs, s...)
44 if ctx != nil {
45 cmd = exec.CommandContext(ctx, os.Args[0], cs...)
46 } else {
47 cmd = exec.Command(os.Args[0], cs...)
48 }
49 cmd.Env = []string{"GO_WANT_HELPER_PROCESS=1"}
50 return cmd
51}
52
53func helperCommand(t *testing.T, s ...string) *exec.Cmd {
54 return helperCommandContext(t, nil, s...)

Callers 1

helperCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected