summaryrefslogtreecommitdiff
path: root/test/testpy
diff options
context:
space:
mode:
authorDaniel Bevenius <daniel.bevenius@gmail.com>2018-11-15 05:37:55 +0100
committerDaniel Bevenius <daniel.bevenius@gmail.com>2018-11-18 13:26:08 +0100
commit23e692813f24538285df6fa0d30773cf5b1401f9 (patch)
treebb51198c6a26a1cc1ed3e9193e64c26e1dd5372a /test/testpy
parent34eccb2a1b1f4d7e8ddf7c0bc6f6d61ec530381f (diff)
downloadandroid-node-v8-23e692813f24538285df6fa0d30773cf5b1401f9.tar.gz
android-node-v8-23e692813f24538285df6fa0d30773cf5b1401f9.tar.bz2
android-node-v8-23e692813f24538285df6fa0d30773cf5b1401f9.zip
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: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'test/testpy')
-rw-r--r--test/testpy/__init__.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/test/testpy/__init__.py b/test/testpy/__init__.py
index 27d7124bf2..7ba9674d7d 100644
--- a/test/testpy/__init__.py
+++ b/test/testpy/__init__.py
@@ -61,7 +61,7 @@ class SimpleTestCase(test.TestCase):
source = open(self.file).read()
flags_match = FLAGS_PATTERN.search(source)
if flags_match:
- flag = flags_match.group(1).strip().split()
+ flags = flags_match.group(1).strip().split()
# 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
@@ -71,13 +71,17 @@ class SimpleTestCase(test.TestCase):
# inspector related tests). Also, if there is no ssl support the options
# '--use-bundled-ca' and '--use-openssl-ca' will also cause a similar
# failure so such tests are also skipped.
- if ('--inspect' in flag[0] or \
- '--use-bundled-ca' in flag[0] or \
- '--use-openssl-ca' in flag[0]) and \
- self.context.v8_enable_inspector == 0:
- print('Skipping as node was configured --without-ssl')
+ if (any(flag.startswith('--inspect') for flag in flags) and
+ not self.context.v8_enable_inspector):
+ print('Skipping as node was compiled without inspector support')
+ elif (('--use-bundled-ca' in flags or
+ '--use-openssl-ca' in flags or
+ '--tls-v1.0' in flags or
+ '--tls-v1.1' in flags) and
+ not self.context.node_has_crypto):
+ print('Skipping as node was compiled without crypto support')
else:
- result += flag
+ result += flags
files_match = FILES_PATTERN.search(source);
additional_files = []
if files_match: