summaryrefslogtreecommitdiffstats
path: root/test/framework.py
diff options
context:
space:
mode:
authorKlement Sekera <klement.sekera@gmail.com>2022-03-10 11:47:45 +0100
committerDave Wallace <dwallacelf@gmail.com>2022-03-22 00:50:23 +0000
commitb3fc65817ef1aec3bf5f51bc00633e03428e64fc (patch)
treedc8e645003d909e7b53bee83278fd04fc037305f /test/framework.py
parentf0574da2b75f3e035362996d6e1246150eb64bea (diff)
tests: fix DEBUG=attach functionality
Make make test-start-vpp-in-gdb work again. Fix incorrect temp directory when using DEBUG=attach. Type: fix Fixes: b23ffd7ef216463c35b75c831e6a27e58971f4ec Change-Id: Ie98b637acbbe0221606ccdc7b54f63885e5951a4 Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Diffstat (limited to 'test/framework.py')
-rw-r--r--test/framework.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/framework.py b/test/framework.py
index 257c85e9f5e..8065518ff7a 100644
--- a/test/framework.py
+++ b/test/framework.py
@@ -524,10 +524,13 @@ class VppTestCase(CPUInterface, unittest.TestCase):
@classmethod
def get_tempdir(cls):
- tmpdir = f"{config.tmp_dir}/vpp-unittest-{cls.__name__}"
- if config.wipe_tmp_dir:
- shutil.rmtree(tmpdir, ignore_errors=True)
- os.mkdir(tmpdir)
+ if cls.debug_attach:
+ tmpdir = f"{config.tmp_dir}/unittest-attach-gdb"
+ else:
+ tmpdir = f"{config.tmp_dir}/vpp-unittest-{cls.__name__}"
+ if config.wipe_tmp_dir:
+ shutil.rmtree(tmpdir, ignore_errors=True)
+ os.mkdir(tmpdir)
return tmpdir
@classmethod