summary refs log tree commit diff stats
path: root/tests/testament/tester.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2015-01-28 15:14:39 +0100
committerAndreas Rumpf <rumpf_a@web.de>2015-01-28 15:14:39 +0100
commit190cc01f2407629a31d0796eb55283fce7ec8093 (patch)
tree7bfe79d24264f1641428449c0e3d63c4d69cfaa6 /tests/testament/tester.nim
parentd9c73b49d16c64db841185d4a3efe32bc4d4dc1f (diff)
parent842c7f67ca06266d99577a31718ae1084cde033d (diff)
downloadNim-190cc01f2407629a31d0796eb55283fce7ec8093.tar.gz
Merge pull request #2017 from reactormonk/nodejs-binary
Algorithm to find the nodejs binary
Diffstat (limited to 'tests/testament/tester.nim')
-rw-r--r--tests/testament/tester.nim7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/testament/tester.nim b/tests/testament/tester.nim
index b37f72f04..33cd2291d 100644
--- a/tests/testament/tester.nim
+++ b/tests/testament/tester.nim
@@ -12,7 +12,7 @@
 import
   parseutils, strutils, pegs, os, osproc, streams, parsecfg, json,
   marshal, backend, parseopt, specs, htmlgen, browsers, terminal,
-  algorithm
+  algorithm, nodejs
 
 const
   resultsFile = "testresults.html"
@@ -187,12 +187,13 @@ proc testSpec(r: var TResults, test: TTest) =
         else:
           exeFile = changeFileExt(tname, ExeExt)
         if existsFile(exeFile):
-          if test.target == targetJS and findExe("nodejs") == "":
+          let nodejs = findNodeJs()
+          if test.target == targetJS and nodejs == "":
             r.addResult(test, expected.outp, "nodejs binary not in PATH",
                         reExeNotFound)
             return
           var (buf, exitCode) = execCmdEx(
-            (if test.target == targetJS: "nodejs " else: "") & exeFile)
+            (if test.target == targetJS: nodejs & " " else: "") & exeFile)
           if exitCode != expected.exitCode:
             r.addResult(test, "exitcode: " & $expected.exitCode,
                               "exitcode: " & $exitCode, reExitCodesDiffer)