aboutsummaryrefslogtreecommitdiffstats
path: root/test/run_tests.py
diff options
context:
space:
mode:
authorKlement Sekera <klement.sekera@gmail.com>2022-05-13 18:01:36 +0200
committerDave Wallace <dwallacelf@gmail.com>2022-05-24 16:13:09 +0000
commit152a9b6165c640bd551447e87a68132709864b67 (patch)
tree5db805481be75583e55e7b10cf0c8fa12bf39cc5 /test/run_tests.py
parent0bfc222e3df4e5ccfb7c6f580d8943681a88f031 (diff)
tests: fix default failed dir setting
When running tests via run.sh, default setting of None would cause failed directory symlink to appear in vpp workspace with an ugly name. This patch places the symlink in temporary directory. Type: fix Fixes: b23ffd7ef216463c35b75c831e6a27e58971f4ec Signed-off-by: Klement Sekera <klement.sekera@gmail.com> Change-Id: Ic1715eba7ac1f82f71855e2aeb9b659d27bbb3af
Diffstat (limited to 'test/run_tests.py')
-rw-r--r--test/run_tests.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/run_tests.py b/test/run_tests.py
index 5df37efba6b..917e0dc0057 100644
--- a/test/run_tests.py
+++ b/test/run_tests.py
@@ -5,7 +5,6 @@ import shutil
import os
import fnmatch
import unittest
-import argparse
import time
import threading
import traceback
@@ -14,7 +13,6 @@ import re
from multiprocessing import Process, Pipe, get_context
from multiprocessing.queues import Queue
from multiprocessing.managers import BaseManager
-import framework
from config import config, num_cpus, available_cpus, max_vpp_cpus
from framework import (
VppTestRunner,
@@ -28,7 +26,7 @@ from framework import (
TEST_RUN,
SKIP_CPU_SHORTAGE,
)
-from debug import spawn_gdb, start_vpp_in_gdb
+from debug import spawn_gdb
from log import (
get_parallel_logger,
double_line_delim,
@@ -269,7 +267,7 @@ def handle_failed_suite(logger, last_test_temp_dir, vpp_pid, vpp_binary):
if last_test_temp_dir:
# Need to create link in case of a timeout or core dump without failure
lttd = os.path.basename(last_test_temp_dir)
- link_path = "%s%s-FAILED" % (config.failed_dir, lttd)
+ link_path = os.path.join(config.failed_dir, f"{lttd}-FAILED")
if not os.path.exists(link_path):
os.symlink(last_test_temp_dir, link_path)
logger.error(