2020
2121
2222BROWSERTIME_SRC_ROOT = Path (__file__ ).parent
23- PILLOW_VERSION = "6.0.0 "
23+ PILLOW_VERSION = "6.2.1 "
2424PYSSIM_VERSION = "0.4"
2525
2626
@@ -60,6 +60,7 @@ class BrowsertimeRunner(NodeRunner):
6060 arguments = {
6161 "cycles" : {"type" : int , "default" : 1 , "help" : "Number of full cycles" },
6262 "iterations" : {"type" : int , "default" : 1 , "help" : "Number of iterations" },
63+ "node" : {"type" : str , "default" : None , "help" : "Path to Node.js" },
6364 "geckodriver" : {"type" : str , "default" : None , "help" : "Path to geckodriver" },
6465 "binary" : {
6566 "type" : str ,
@@ -125,6 +126,10 @@ def browsertime_js(self):
125126 def setup (self ):
126127 """Install browsertime and visualmetrics.py prerequisites and the Node.js package.
127128 """
129+ node = self .get_arg ("node" )
130+ if node is not None :
131+ os .environ ["NODEJS" ] = node
132+
128133 super (BrowsertimeRunner , self ).setup ()
129134 install_url = self .get_arg ("install-url" )
130135
@@ -138,7 +143,7 @@ def setup(self):
138143
139144 # installing Python deps on the fly
140145 for dep in ("Pillow==%s" % PILLOW_VERSION , "pyssim==%s" % PYSSIM_VERSION ):
141- install_package (self .virtualenv_manager , dep )
146+ install_package (self .virtualenv_manager , dep , ignore_failure = True )
142147
143148 # check if the browsertime package has been deployed correctly
144149 # for this we just check for the browsertime directory presence
@@ -236,21 +241,25 @@ def extra_default_args(self, args=[]):
236241 extra_args .append ("--skipHar" )
237242
238243 if not matches (args , "--android" ):
239- # If --firefox.binaryPath is not specified, default to the objdir binary
240- # Note: --firefox.release is not a real browsertime option, but it will
241- # silently ignore it instead and default to a release installation.
242- if (
243- not matches (
244- args ,
245- "--firefox.binaryPath" ,
246- "--firefox.release" ,
247- "--firefox.nightly" ,
248- "--firefox.beta" ,
249- "--firefox.developer" ,
250- )
251- and extract_browser_name (args ) != "chrome"
252- ):
253- extra_args .extend (("--firefox.binaryPath" , self .get_binary_path ()))
244+ binary = self .get_arg ("binary" )
245+ if binary is not None :
246+ extra_args .extend (("--firefox.binaryPath" , binary ))
247+ else :
248+ # If --firefox.binaryPath is not specified, default to the objdir binary
249+ # Note: --firefox.release is not a real browsertime option, but it will
250+ # silently ignore it instead and default to a release installation.
251+ if (
252+ not matches (
253+ args ,
254+ "--firefox.binaryPath" ,
255+ "--firefox.release" ,
256+ "--firefox.nightly" ,
257+ "--firefox.beta" ,
258+ "--firefox.developer" ,
259+ )
260+ and extract_browser_name (args ) != "chrome"
261+ ):
262+ extra_args .extend (("--firefox.binaryPath" , self .get_binary_path ()))
254263
255264 geckodriver = self .get_arg ("geckodriver" )
256265 if geckodriver is not None :
0 commit comments