test: skip tests using ca flags

Currently when building --without-ssl there is a failure due to a change
made by me in commit 3cf88a45e86f28dcc72c730adf4ead919ab882bd ("test:
add --use-bundled-ca to tls-cnnic-whitelist") which added a
'--use-bundled-ca' flag to that test. But when building --without-ssl
that flag will be invalid and an error (bad option)  will be reported.

This commit filters tests that specify the --use-bundled-ca or
--use-openssl-ca flags so that they are skipped when configured
--without-ssl.

PR-URL: https://github.com/nodejs/node/pull/12485
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Daniel Bevenius 2017-04-18 15:16:00 +02:00
parent d8965d5b0e
commit f3f9dd73aa

View File

@ -72,9 +72,14 @@ class SimpleTestCase(test.TestCase):
# 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).
if flag[0].startswith('--inspect') and self.context.v8_enable_inspector == 0:
print('Skipping as inspector is disabled')
# 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')
else:
result += flag
files_match = FILES_PATTERN.search(source);