diff options
author | Klement Sekera <klement.sekera@gmail.com> | 2022-05-13 18:01:36 +0200 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2022-05-24 16:13:09 +0000 |
commit | 152a9b6165c640bd551447e87a68132709864b67 (patch) | |
tree | 5db805481be75583e55e7b10cf0c8fa12bf39cc5 /test/config.py | |
parent | 0bfc222e3df4e5ccfb7c6f580d8943681a88f031 (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/config.py')
-rw-r--r-- | test/config.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/config.py b/test/config.py index c99d1ca66a6..b94dbcb10d7 100644 --- a/test/config.py +++ b/test/config.py @@ -1,7 +1,6 @@ import argparse import os import psutil -import textwrap import time @@ -119,7 +118,7 @@ parser.add_argument( "--failed-dir", action="store", type=directory, - help="directory containing failed tests", + help="directory containing failed tests (default: --tmp-dir)", ) filter_help_string = """\ @@ -357,8 +356,7 @@ parser.add_argument( "--keep-pcaps", action="store_true", default=default_keep_pcaps, - help="if set, keep all pcap files from a test run" - f" (default: {default_keep_pcaps})", + help=f"if set, keep all pcap files from a test run (default: {default_keep_pcaps})", ) config = parser.parse_args() @@ -399,6 +397,9 @@ config.test_src_dir = test_dirs if config.venv_dir is None: config.venv_dir = f"{ws}/test/venv" +if config.failed_dir is None: + config.failed_dir = f"{config.tmp_dir}" + available_cpus = psutil.Process().cpu_affinity() num_cpus = len(available_cpus) |