Remove valgrind
This commit is contained in:
parent
ac043771ff
commit
ae592821c6
2 changed files with 0 additions and 16 deletions
|
@ -94,7 +94,6 @@ clean-install \
|
||||||
libmaxminddb-dev \
|
libmaxminddb-dev \
|
||||||
dumb-init \
|
dumb-init \
|
||||||
gdb \
|
gdb \
|
||||||
valgrind \
|
|
||||||
bc \
|
bc \
|
||||||
|| exit 1
|
|| exit 1
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ package controller
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
|
@ -80,23 +79,9 @@ const (
|
||||||
cfgPath = "/etc/nginx/nginx.conf"
|
cfgPath = "/etc/nginx/nginx.conf"
|
||||||
)
|
)
|
||||||
|
|
||||||
var valgrind = []string{
|
|
||||||
"--tool=memcheck",
|
|
||||||
"--leak-check=full",
|
|
||||||
"--show-leak-kinds=all",
|
|
||||||
"--leak-check=yes",
|
|
||||||
}
|
|
||||||
|
|
||||||
func nginxExecCommand(args ...string) *exec.Cmd {
|
func nginxExecCommand(args ...string) *exec.Cmd {
|
||||||
cmdArgs := []string{}
|
cmdArgs := []string{}
|
||||||
|
|
||||||
if os.Getenv("RUN_WITH_VALGRIND") == "true" {
|
|
||||||
cmdArgs = append(cmdArgs, valgrind...)
|
|
||||||
cmdArgs = append(cmdArgs, defBinary, "-c", cfgPath)
|
|
||||||
cmdArgs = append(cmdArgs, args...)
|
|
||||||
return exec.Command("valgrind", cmdArgs...)
|
|
||||||
}
|
|
||||||
|
|
||||||
cmdArgs = append(cmdArgs, "-c", cfgPath)
|
cmdArgs = append(cmdArgs, "-c", cfgPath)
|
||||||
cmdArgs = append(cmdArgs, args...)
|
cmdArgs = append(cmdArgs, args...)
|
||||||
return exec.Command(defBinary, cmdArgs...)
|
return exec.Command(defBinary, cmdArgs...)
|
||||||
|
|
Loading…
Reference in a new issue