normalizeExe (#14668)

This commit is contained in:
Timothee Cour 2020-06-15 01:57:34 -07:00 • committed by GitHub
commit bf604c6829
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 10 deletions

View file

@ -13,8 +13,8 @@ import
strutils, pegs, os, osproc, streams, json,
backend, parseopt, specs, htmlgen, browsers, terminal,
algorithm, times, md5, sequtils, azure
include compiler/nodejs
from std/sugar import dup
import compiler/nodejs
var useColors = true
var backendLogging = true
@ -450,12 +450,7 @@ proc testSpecHelper(r: var TResults, test: TTest, expected: TSpec,
exeCmd = nodejs
args = concat(@[exeFile], args)
else:
if defined(posix) and not exeFile.contains('/'):
# "security" in Posix is actually just a euphemism
# for "unproductive arbitrary shit"
exeCmd = "./" & exeFile
else:
exeCmd = exeFile
exeCmd = exeFile.dup(normalizeExe)
if expected.useValgrind:
args = @["--error-exitcode=1"] & exeCmd & args
exeCmd = "valgrind"