|
|
@@ -96,6 +96,7 @@ func InitializeServerConfig(config *core.Config) (*exec.Cmd, error) {
|
|
|
|
|
|
var (
|
|
|
testBinaryPath string
|
|
|
+ testBinaryCleanFn func()
|
|
|
testBinaryPathGen sync.Once
|
|
|
)
|
|
|
|
|
|
@@ -108,6 +109,7 @@ func genTestBinaryPath() {
|
|
|
return err
|
|
|
}
|
|
|
tempDir = dir
|
|
|
+ testBinaryCleanFn = func() { os.RemoveAll(dir) }
|
|
|
return nil
|
|
|
}))
|
|
|
file := filepath.Join(tempDir, "xray.test")
|