Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d2d6287

Browse filesBrowse files
danbevcodebytere
authored andcommitted
test: skip test that use --tls-v1.x flags
Currently, configuring --without-ssl will cause the following test to fail: === release test-https-agent-additional-options === Path: parallel/test-https-agent-additional-options out/Release/node: bad option: --tls-v1.1 Command: out/Release/node --tls-v1.1 /node/test/parallel/test-https-agent-additional-options.js === release test-https-agent-session-eviction === Path: parallel/test-https-agent-session-eviction out/Release/node: bad option: --tls-v1.0 Command: out/Release/node --tls-v1.0 /node/test/parallel/test-https-agent-session-eviction.js This commit adds a check for the --tls-v.x flags and skips them if node was built without crypto support. PR-URL: #24376 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
1 parent be14283 commit d2d6287
Copy full SHA for d2d6287

File tree

Expand file treeCollapse file tree

2 files changed

+20
-10
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+20
-10
lines changed
Open diff view settings
Collapse file

‎test/testpy/__init__.py‎

Copy file name to clipboardExpand all lines: test/testpy/__init__.py
+11-7Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def GetCommand(self):
6161
source = open(self.file).read()
6262
flags_match = FLAGS_PATTERN.search(source)
6363
if flags_match:
64-
flag = flags_match.group(1).strip().split()
64+
flags = flags_match.group(1).strip().split()
6565
# The following block reads config.gypi to extract the v8_enable_inspector
6666
# value. This is done to check if the inspector is disabled in which case
6767
# the '--inspect' flag cannot be passed to the node process as it will
@@ -71,13 +71,17 @@ def GetCommand(self):
7171
# inspector related tests). Also, if there is no ssl support the options
7272
# '--use-bundled-ca' and '--use-openssl-ca' will also cause a similar
7373
# failure so such tests are also skipped.
74-
if ('--inspect' in flag[0] or \
75-
'--use-bundled-ca' in flag[0] or \
76-
'--use-openssl-ca' in flag[0]) and \
77-
self.context.v8_enable_inspector == 0:
78-
print('Skipping as node was configured --without-ssl')
74+
if (any(flag.startswith('--inspect') for flag in flags) and
75+
not self.context.v8_enable_inspector):
76+
print('Skipping as node was compiled without inspector support')
77+
elif (('--use-bundled-ca' in flags or
78+
'--use-openssl-ca' in flags or
79+
'--tls-v1.0' in flags or
80+
'--tls-v1.1' in flags) and
81+
not self.context.node_has_crypto):
82+
print('Skipping as node was compiled without crypto support')
7983
else:
80-
result += flag
84+
result += flags
8185
files_match = FILES_PATTERN.search(source);
8286
additional_files = []
8387
if files_match:
Collapse file

‎tools/test.py‎

Copy file name to clipboardExpand all lines: tools/test.py
+9-3Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,7 @@ def __init__(self, workspace, buildspace, verbose, vm, args, expect_fail,
907907
self.repeat = repeat
908908
self.abort_on_timeout = abort_on_timeout
909909
self.v8_enable_inspector = True
910+
self.node_has_crypto = True
910911

911912
def GetVm(self, arch, mode):
912913
if arch == 'none':
@@ -1632,9 +1633,14 @@ def Main():
16321633

16331634
# We want to skip the inspector tests if node was built without the inspector.
16341635
has_inspector = Execute([vm,
1635-
"-p", "process.config.variables.v8_enable_inspector"], context)
1636-
if has_inspector.stdout.rstrip() == "0":
1637-
context.v8_enable_inspector = False
1636+
'-p', 'process.config.variables.v8_enable_inspector'], context)
1637+
if has_inspector.stdout.rstrip() == '0':
1638+
context.v8_enable_inspector = False
1639+
1640+
has_crypto = Execute([vm,
1641+
'-p', 'process.versions.openssl'], context)
1642+
if has_crypto.stdout.rstrip() == 'undefined':
1643+
context.node_has_crypto = False
16381644

16391645
if options.cat:
16401646
visited = set()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.