summaryrefslogtreecommitdiff
path: root/scripts/TestUtil.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/TestUtil.py')
-rwxr-xr-xscripts/TestUtil.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/TestUtil.py b/scripts/TestUtil.py
index 8a5283ddb1a..cde967e2470 100755
--- a/scripts/TestUtil.py
+++ b/scripts/TestUtil.py
@@ -154,6 +154,20 @@ for path in os.environ["PATH"].split(os.pathsep):
elif os.path.exists(os.path.join(path, "php5")):
phpCmd = "php5"
break
+#
+# The NodeJS interpreter is called "nodejs" on some platforms
+# (e.g., Ubuntu)
+#
+nodeCmd = "node"
+for path in os.environ["PATH"].split(os.pathsep):
+ #
+ # Stop if we find "php" in the PATH first.
+ #
+ if os.path.exists(os.path.join(path, "node")):
+ break
+ elif os.path.exists(os.path.join(path, "nodejs")):
+ phpCmd = "nodejs"
+ break
#
# This is set by the choice of init method. If not set, before it is