aboutsummaryrefslogtreecommitdiff
path: root/test/testpy/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/testpy/__init__.py')
-rw-r--r--test/testpy/__init__.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/testpy/__init__.py b/test/testpy/__init__.py
index 367346f6e1..d7ec88992e 100644
--- a/test/testpy/__init__.py
+++ b/test/testpy/__init__.py
@@ -29,6 +29,7 @@ import test
import os
from os.path import join, dirname, exists
import re
+import ast
FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)")
@@ -64,7 +65,18 @@ class SimpleTestCase(test.TestCase):
# PORT should match the definition in test/common.js.
env = { 'PORT': int(os.getenv('NODE_COMMON_PORT', '12346')) }
env['PORT'] += self.thread_id * 100
- result += flags_match.group(1).strip().format(**env).split()
+ flag = flags_match.group(1).strip().format(**env).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
+ # 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')
+ else:
+ result += flag
files_match = FILES_PATTERN.search(source);
additional_files = []
if files_match: