summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorSimon Hafner <hafnersimon@gmail.com>2015-01-24 18:02:00 -0600
committerSimon Hafner <hafnersimon@gmail.com>2015-01-27 13:02:17 -0600
commit2beaa7a2da40e336b9606949ba65e0631c775767 (patch)
treeed794be15497d993fc57ecc60ac6fde138ed6174 /tests
parent9c12ad0187746d18589c655475b50571fc28fef4 (diff)
downloadNim-2beaa7a2da40e336b9606949ba65e0631c775767.tar.gz
find the nodejs binary
upstream calls it node, debian calls it nodejs. We gotta look for both
of them.
Diffstat (limited to 'tests')
-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 ba3abd1bd..9a53f960a 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)