diff options
author | Benoit Foucher <benoit@zeroc.com> | 2019-07-11 17:52:11 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2019-07-11 17:52:11 +0200 |
commit | a529b6dc24c4aa2735c38a2c2f53a545df4b9524 (patch) | |
tree | d9514ef641850524a00f66cd6a4d934f6543ea68 /scripts/Util.py | |
parent | Fixed dispatcher interceptor bug #435 (diff) | |
download | ice-a529b6dc24c4aa2735c38a2c2f53a545df4b9524.tar.bz2 ice-a529b6dc24c4aa2735c38a2c2f53a545df4b9524.tar.xz ice-a529b6dc24c4aa2735c38a2c2f53a545df4b9524.zip |
Check for NodeJS to build/run JS tests
Diffstat (limited to 'scripts/Util.py')
-rw-r--r-- | scripts/Util.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/Util.py b/scripts/Util.py index 440fe346eb7..023cc9159cf 100644 --- a/scripts/Util.py +++ b/scripts/Util.py @@ -219,6 +219,8 @@ class Platform(object): except: self.nugetPackageCache = None + self._hasNodeJS = None + def init(self, component): self.parseBuildVariables(component, { "supported-platforms" : ("supportedPlatforms", lambda s : s.split(" ")), @@ -228,6 +230,15 @@ class Platform(object): def hasDotNet(self): return self.nugetPackageCache != None + def hasNodeJS(self): + if self._hasNodeJS is None: + try: + run("node --version") + self._hasNodeJS = True + except: + self._hasNodeJS = False + return self._hasNodeJS + def parseBuildVariables(self, component, variables): # Run make to get the values of the given variables if os.path.exists(os.path.join(component.getSourceDir(), "Makefile")): # Top level makefile |