MCPcopy
hub / github.com/cloudfoundry/cli / BuildTestBinary

Function BuildTestBinary

cf/util/testhelpers/pluginbuilder/plugin_builder.go:9–23  ·  view source on GitHub ↗
(relativePathToPluginDir, pluginFileName string)

Source from the content-addressed store, hash-verified

7)
8
9func BuildTestBinary(relativePathToPluginDir, pluginFileName string) {
10 dir, err := os.Getwd()
11 if err != nil {
12 panic(err)
13 }
14
15 binaryDestination := filepath.Join(dir, relativePathToPluginDir, pluginFileName+".exe")
16 pluginSourceFile := filepath.Join(dir, relativePathToPluginDir, pluginFileName+".go")
17
18 cmd := exec.Command("go", "build", "-o", binaryDestination, pluginSourceFile)
19 err = cmd.Run()
20 if err != nil {
21 panic(err)
22 }
23}

Callers 3

TestPluginFunction · 0.92
TestTestRpcServerExampleFunction · 0.92
TestPluginFunction · 0.92

Calls 2

CommandMethod · 0.65
RunMethod · 0.65

Tested by 3

TestPluginFunction · 0.74
TestTestRpcServerExampleFunction · 0.74
TestPluginFunction · 0.74