mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
test: make tests pass when configured without-ssl
Currently when node is build --without-ssl and the test are run, there are a number of failing test due to tests expecting crypto support to be available. This commit fixes fixes the failure and instead skips the tests that expect crypto to be available. PR-URL: https://github.com/nodejs/node/pull/11631 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
1 parent
9352528779
commit
1402fef098
17 files changed
+67
-28
No files matched your search
+19
-2
@@ -43,6 +43,7 @@ import utils
|
||||
import multiprocessing
|
||||
import errno
|
||||
import copy
|
||||
import ast
|
||||
|
||||
from os.path import join, dirname, abspath, basename, isdir, exists
|
||||
from datetime import datetime
|
||||
@@ -867,7 +868,8 @@ class Context(object):
|
||||
|
||||
def __init__(self, workspace, buildspace, verbose, vm, args, expect_fail,
|
||||
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.buildspace = buildspace
|
||||
self.verbose = verbose
|
||||
@@ -880,6 +882,7 @@ class Context(object):
|
||||
self.store_unexpected_output = store_unexpected_output
|
||||
self.repeat = repeat
|
||||
self.abort_on_timeout = abort_on_timeout
|
||||
self.v8_enable_inspector = v8_enable_inspector
|
||||
|
||||
def GetVm(self, arch, mode):
|
||||
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)
|
||||
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 ---
|
||||
@@ -1587,7 +1603,8 @@ def Main():
|
||||
options.suppress_dialogs,
|
||||
options.store_unexpected_output,
|
||||
options.repeat,
|
||||
options.abort_on_timeout)
|
||||
options.abort_on_timeout,
|
||||
GetV8InspectorEnabledFlag())
|
||||
|
||||
# Get status for tests
|
||||
sections = [ ]
|
||||
|
||||
Reference in new issue
Block a user