File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -585,6 +585,10 @@ def startup(self, detected_browsers):
585585 if self .get_node_version () < 16.0 :
586586 logging .warning ("Node.js 16 or newer is required for Lighthouse testing" )
587587
588+ # Force lighthouse 11.4.0
589+ if self .get_lighthouse_version () != '11.4.0' :
590+ subprocess .
call ([
'sudo' ,
'npm' ,
'i' ,
'-g' ,
'[email protected] ' ])
591+
588592 # Check the iOS install
589593 if self .ios is not None :
590594 ret = self .requires ('usbmuxwrapper' ) and ret
@@ -625,6 +629,20 @@ def get_node_version(self):
625629 pass
626630 return version
627631
632+ def get_lighthouse_version (self ):
633+ """Get the installed version of lighthouse"""
634+ version = None
635+ try :
636+ if sys .version_info >= (3 , 0 ):
637+ stdout = subprocess .check_output (['lighthouse' , '--version' ], encoding = 'UTF-8' )
638+ else :
639+ stdout = subprocess .check_output (['lighthouse' , '--version' ])
640+ version = stdout .strip ()
641+ except Exception :
642+ pass
643+
644+ return version
645+
628646 def update_windows_certificates (self ):
629647 """ Update the root Windows certificates"""
630648 try :
You can’t perform that action at this time.
0 commit comments