summaryrefslogtreecommitdiffstats
path: root/test/framework.py
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2017-03-02 11:27:11 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2017-03-06 16:17:21 +0000
commit80a7f0a81cf6bc58cd7567c7b5e1c75813b5fc0c (patch)
tree3018ec9e23adc8c85bb3aed3f329c5e6529dff88 /test/framework.py
parentc8c44ebea155f15a9e3067fe05228a1e932185fc (diff)
make test: tell vpp to set coredump size
Unless overridden by COREDUMP_SIZE env variable, tell VPP to set coredump size to unlimited, otherwise use $COREDUMP_SIZE as the argument. Change-Id: Ia2a6508207c66a171b33d272c820b1deb4a83e82 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test/framework.py')
-rw-r--r--test/framework.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/test/framework.py b/test/framework.py
index 3bbd37d5d59..b9a09de277e 100644
--- a/test/framework.py
+++ b/test/framework.py
@@ -110,10 +110,6 @@ class VppTestCase(unittest.TestCase):
return
dl = d.lower()
if dl == "core":
- if resource.getrlimit(resource.RLIMIT_CORE)[0] <= 0:
- # give a heads up if this is actually useless
- print(colorize("WARNING: core size limit is set 0, core files "
- "will NOT be created", RED))
cls.debug_core = True
elif dl == "gdb":
cls.debug_gdb = True
@@ -140,8 +136,17 @@ class VppTestCase(unittest.TestCase):
debug_cli = ""
if cls.step or cls.debug_gdb or cls.debug_gdbserver:
debug_cli = "cli-listen localhost:5002"
- cls.vpp_cmdline = [cls.vpp_bin,
- "unix", "{", "nodaemon", debug_cli, "}",
+ coredump_size = None
+ try:
+ size = os.getenv("COREDUMP_SIZE")
+ if size is not None:
+ coredump_size = "coredump-size %s" % size
+ except:
+ pass
+ if coredump_size is None:
+ coredump_size = "coredump-size unlimited"
+ cls.vpp_cmdline = [cls.vpp_bin, "unix",
+ "{", "nodaemon", debug_cli, coredump_size, "}",
"api-trace", "{", "on", "}",
"api-segment", "{", "prefix", cls.shm_prefix, "}"]
if cls.plugin_path is not None: