diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile | 5 | ||||
-rw-r--r-- | test/framework.py | 11 |
2 files changed, 10 insertions, 6 deletions
diff --git a/test/Makefile b/test/Makefile index e1238fb728a..82cef838978 100644 --- a/test/Makefile +++ b/test/Makefile @@ -250,10 +250,11 @@ endif EXTRA_ARGS=$(ARG0) $(ARG1) $(ARG2) $(ARG3) $(ARG4) $(ARG5) $(ARG6) $(ARG7) $(ARG8) $(ARG9) $(ARG10) $(ARG11) $(ARG12) $(ARG13) $(ARG14) $(ARG15) $(ARG16) -RUN_TESTS_ARGS=--failed-dir=$(FAILED_DIR) --verbose=$(V) --jobs=$(TEST_JOBS) --filter=$(TEST) --retries=$(RETRIES) --venv-dir=$(VENV_PATH) --vpp-ws-dir=$(WS_ROOT) --vpp-tag=$(TAG) --rnd-seed=$(RND_SEED) --vpp-worker-count="$(VPP_WORKER_COUNT)" --keep-pcaps --python-opts=$(PYTHON_OPTS) $(PLUGIN_PATH_ARGS) $(TEST_PLUGIN_PATH_ARGS) $(EXTRA_ARGS) +RUN_TESTS_ARGS=--failed-dir=$(FAILED_DIR) --verbose=$(V) --jobs=$(TEST_JOBS) --filter=$(TEST) --retries=$(RETRIES) --venv-dir=$(VENV_PATH) --vpp-ws-dir=$(WS_ROOT) --vpp-tag=$(TAG) --rnd-seed=$(RND_SEED) --vpp-worker-count="$(VPP_WORKER_COUNT)" --keep-pcaps $(PLUGIN_PATH_ARGS) $(TEST_PLUGIN_PATH_ARGS) $(EXTRA_ARGS) +RUN_SCRIPT_ARGS=--python-opts=$(PYTHON_OPTS) define retest-func -@scripts/run.sh $(RUN_TESTS_ARGS) || env FAILED_DIR=$(FAILED_DIR) COMPRESS_FAILED_TEST_LOGS=$(COMPRESS_FAILED_TEST_LOGS) scripts/compress_failed.sh +@scripts/run.sh $(RUN_SCRIPT_ARGS) $(RUN_TESTS_ARGS) || env FAILED_DIR=$(FAILED_DIR) COMPRESS_FAILED_TEST_LOGS=$(COMPRESS_FAILED_TEST_LOGS) scripts/compress_failed.sh endef sanity: test-dep 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 |