@ -43,6 +43,7 @@ import utils
import multiprocessing
import multiprocessing
import errno
import errno
import copy
import copy
import ast
from os . path import join , dirname , abspath , basename , isdir , exists
from os . path import join , dirname , abspath , basename , isdir , exists
from datetime import datetime
from datetime import datetime
@ -867,7 +868,8 @@ class Context(object):
def __init__ ( self , workspace , buildspace , verbose , vm , args , expect_fail ,
def __init__ ( self , workspace , buildspace , verbose , vm , args , expect_fail ,
timeout , processor , suppress_dialogs ,
timeout , processor , suppress_dialogs ,
store_unexpected_output , repeat , abort_on_timeout ) :
store_unexpected_output , repeat , abort_on_timeout ,
v8_enable_inspector ) :
self . workspace = workspace
self . workspace = workspace
self . buildspace = buildspace
self . buildspace = buildspace
self . verbose = verbose
self . verbose = verbose
@ -880,6 +882,7 @@ class Context(object):
self . store_unexpected_output = store_unexpected_output
self . store_unexpected_output = store_unexpected_output
self . repeat = repeat
self . repeat = repeat
self . abort_on_timeout = abort_on_timeout
self . abort_on_timeout = abort_on_timeout
self . v8_enable_inspector = v8_enable_inspector
def GetVm ( self , arch , mode ) :
def GetVm ( self , arch , mode ) :
if arch == ' none ' :
if arch == ' none ' :
@ -912,6 +915,19 @@ def RunTestCases(cases_to_run, progress, tasks, flaky_tests_mode):
progress = PROGRESS_INDICATORS [ progress ] ( cases_to_run , flaky_tests_mode )
progress = PROGRESS_INDICATORS [ progress ] ( cases_to_run , flaky_tests_mode )
return progress . Run ( tasks )
return progress . Run ( tasks )
def GetV8InspectorEnabledFlag ( ) :
# The following block reads config.gypi to extract the v8_enable_inspector
# value. This is done to check if the inspector is disabled in which case
# the '--inspect' flag cannot be passed to the node process as it will
# cause node to exit and report the test as failed. The use case
# is currently when Node is configured --without-ssl and the tests should
# still be runnable but skip any tests that require ssl (which includes the
# inspector related tests).
with open ( ' config.gypi ' , ' r ' ) as f :
s = f . read ( )
config_gypi = ast . literal_eval ( s )
return config_gypi [ ' variables ' ] [ ' v8_enable_inspector ' ]
# -------------------------------------------
# -------------------------------------------
# --- T e s t C o n f i g u r a t i o n ---
# --- T e s t C o n f i g u r a t i o n ---
@ -1587,7 +1603,8 @@ def Main():
options . suppress_dialogs ,
options . suppress_dialogs ,
options . store_unexpected_output ,
options . store_unexpected_output ,
options . repeat ,
options . repeat ,
options . abort_on_timeout )
options . abort_on_timeout ,
GetV8InspectorEnabledFlag ( ) )
# Get status for tests
# Get status for tests
sections = [ ]
sections = [ ]