attempt to add valgrind support to the CIs and testament (#12646)
* attempt to add valgrind support to the CIs and testament * valgrind (currently) works only on 64-bit Linux
This commit is contained in:
parent
58f3e07b1a
commit
223e65e529
5 changed files with 29 additions and 8 deletions
|
|
@ -100,8 +100,8 @@ proc execCmdEx2(command: string, args: openarray[string]; workingDir, input: str
|
|||
for arg in args:
|
||||
result.cmdLine.add ' '
|
||||
result.cmdLine.add quoteShell(arg)
|
||||
|
||||
var p = startProcess(command, workingDir=workingDir, args=args, options={poStdErrToStdOut, poUsePath})
|
||||
var p = startProcess(command, workingDir=workingDir, args=args,
|
||||
options={poStdErrToStdOut, poUsePath})
|
||||
var outp = outputStream(p)
|
||||
|
||||
# There is no way to provide input for the child process
|
||||
|
|
@ -441,12 +441,16 @@ proc testSpecHelper(r: var TResults, test: TTest, expected: TSpec, target: TTarg
|
|||
if isJsTarget:
|
||||
exeCmd = nodejs
|
||||
args = concat(@[exeFile], args)
|
||||
elif defined(posix) and not exeFile.contains('/'):
|
||||
# "security" in Posix is actually just a euphemism
|
||||
# for "unproductive arbitrary shit"
|
||||
exeCmd = "./" & exeFile
|
||||
else:
|
||||
exeCmd = exeFile
|
||||
if defined(posix) and not exeFile.contains('/'):
|
||||
# "security" in Posix is actually just a euphemism
|
||||
# for "unproductive arbitrary shit"
|
||||
exeCmd = "./" & exeFile
|
||||
else:
|
||||
exeCmd = exeFile
|
||||
if expected.useValgrind:
|
||||
args = exeCmd & args
|
||||
exeCmd = "valgrind"
|
||||
var (_, buf, exitCode) = execCmdEx2(exeCmd, args, input = expected.input)
|
||||
# Treat all failure codes from nodejs as 1. Older versions of nodejs used
|
||||
# to return other codes, but for us it is sufficient to know that it's not 0.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue