8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a91a3fe commit f89ef77Copy full SHA for f89ef77
Makefile
@@ -333,7 +333,7 @@ test-all-valgrind: test-build
333
$(PYTHON) tools/test.py --mode=debug,release --valgrind
334
335
CI_NATIVE_SUITES := addons addons-napi
336
-CI_JS_SUITES := async-hooks doctool inspector known_issues message parallel pseudo-tty sequential
+CI_JS_SUITES := abort async-hooks doctool inspector known_issues message parallel pseudo-tty sequential
337
338
# Build and test addons without building anything else
339
test-ci-native: LOGLEVEL := info
test/abort/testcfg.py
@@ -3,4 +3,4 @@
3
import testpy
4
5
def GetConfiguration(context, root):
6
- return testpy.SimpleTestConfiguration(context, root, 'abort')
+ return testpy.AbortTestConfiguration(context, root, 'abort')
test/testpy/__init__.py
@@ -180,3 +180,15 @@ def ListTests(self, current_path, path, arch, mode):
180
for test in result:
181
test.parallel = True
182
return result
183
+
184
+class AbortTestConfiguration(SimpleTestConfiguration):
185
+ def __init__(self, context, root, section, additional=None):
186
+ super(AbortTestConfiguration, self).__init__(context, root, section,
187
+ additional)
188
189
+ def ListTests(self, current_path, path, arch, mode):
190
+ result = super(AbortTestConfiguration, self).ListTests(
191
+ current_path, path, arch, mode)
192
+ for test in result:
193
+ test.disable_core_files = True
194
+ return result
tools/test.py
@@ -492,6 +492,7 @@ def __init__(self, context, path, arch, mode):
492
self.arch = arch
493
self.mode = mode
494
self.parallel = False
495
+ self.disable_core_files = False
496
self.thread_id = 0
497
498
def IsNegative(self):
@@ -516,7 +517,8 @@ def RunCommand(self, command, env):
516
517
output = Execute(full_command,
518
self.context,
519
self.context.GetTimeout(self.mode),
- env)
520
+ env,
521
+ disable_core_files = self.disable_core_files)
522
self.Cleanup()
523
return TestOutput(self,
524
full_command,
@@ -718,7 +720,7 @@ def CheckedUnlink(name):
718
720
PrintError("os.unlink() " + str(e))
719
721
break
722
-def Execute(args, context, timeout=None, env={}, faketty=False):
723
+def Execute(args, context, timeout=None, env={}, faketty=False, disable_core_files=False):
724
if faketty:
725
import pty
726
(out_master, fd_out) = pty.openpty()
@@ -740,6 +742,14 @@ def Execute(args, context, timeout=None, env={}, faketty=False):
740
742
for key, value in env.iteritems():
741
743
env_copy[key] = value
744
745
+ preexec_fn = None
746
747
+ if disable_core_files and not utils.IsWindows():
748
+ def disableCoreFiles():
749
+ import resource
750
+ resource.setrlimit(resource.RLIMIT_CORE, (0,0))
751
+ preexec_fn = disableCoreFiles
752
753
(process, exit_code, timed_out, output) = RunProcess(
754
context,
755
timeout,
@@ -749,7 +759,8 @@ def Execute(args, context, timeout=None, env={}, faketty=False):
759
stderr = fd_err,
760
env = env_copy,
761
faketty = faketty,
- pty_out = pty_out
762
+ pty_out = pty_out,
763
+ preexec_fn = preexec_fn
764
)
765
766
os.close(out_master)
@@ -1237,6 +1248,7 @@ def __init__(self, case, outcomes):
1237
1248
self.case = case
1238
1249
self.outcomes = outcomes
1239
1250
self.parallel = self.case.parallel
1251
+ self.disable_core_files = self.case.disable_core_files
1240
1252
1241
1253
1242
1254
class Configuration(object):