@@ -889,8 +889,7 @@ class Context(object):
889
889
890
890
def __init__ (self , workspace , buildspace , verbose , vm , args , expect_fail ,
891
891
timeout , processor , suppress_dialogs ,
892
- store_unexpected_output , repeat , abort_on_timeout ,
893
- v8_enable_inspector ):
892
+ store_unexpected_output , repeat , abort_on_timeout ):
894
893
self .workspace = workspace
895
894
self .buildspace = buildspace
896
895
self .verbose = verbose
@@ -902,7 +901,7 @@ def __init__(self, workspace, buildspace, verbose, vm, args, expect_fail,
902
901
self .store_unexpected_output = store_unexpected_output
903
902
self .repeat = repeat
904
903
self .abort_on_timeout = abort_on_timeout
905
- self .v8_enable_inspector = v8_enable_inspector
904
+ self .v8_enable_inspector = True
906
905
907
906
def GetVm (self , arch , mode ):
908
907
if arch == 'none' :
@@ -930,20 +929,6 @@ def RunTestCases(cases_to_run, progress, tasks, flaky_tests_mode):
930
929
progress = PROGRESS_INDICATORS [progress ](cases_to_run , flaky_tests_mode )
931
930
return progress .Run (tasks )
932
931
933
- def GetV8InspectorEnabledFlag ():
934
- # The following block reads config.gypi to extract the v8_enable_inspector
935
- # value. This is done to check if the inspector is disabled in which case
936
- # the '--inspect' flag cannot be passed to the node process as it will
937
- # cause node to exit and report the test as failed. The use case
938
- # is currently when Node is configured --without-ssl and the tests should
939
- # still be runnable but skip any tests that require ssl (which includes the
940
- # inspector related tests).
941
- with open ('config.gypi' , 'r' ) as f :
942
- s = f .read ()
943
- config_gypi = ast .literal_eval (s )
944
- return config_gypi ['variables' ]['v8_enable_inspector' ]
945
-
946
-
947
932
# -------------------------------------------
948
933
# --- T e s t C o n f i g u r a t i o n ---
949
934
# -------------------------------------------
@@ -1626,8 +1611,7 @@ def Main():
1626
1611
options .suppress_dialogs ,
1627
1612
options .store_unexpected_output ,
1628
1613
options .repeat ,
1629
- options .abort_on_timeout ,
1630
- GetV8InspectorEnabledFlag ())
1614
+ options .abort_on_timeout )
1631
1615
1632
1616
# Get status for tests
1633
1617
sections = [ ]
@@ -1670,6 +1654,12 @@ def Main():
1670
1654
all_cases += cases
1671
1655
all_unused .append (unused_rules )
1672
1656
1657
+ # We want to skip the inspector tests if node was built without the inspector.
1658
+ has_inspector = Execute ([vm ,
1659
+ "-p" , "process.config.variables.v8_enable_inspector" ], context )
1660
+ if has_inspector .stdout .rstrip () == "0" :
1661
+ context .v8_enable_inspector = False
1662
+
1673
1663
if options .cat :
1674
1664
visited = set ()
1675
1665
for test in unclassified_tests :
0 commit comments