summaryrefslogtreecommitdiffstats
path: root/test/run-unit-tests.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:40 +0000
commitfc53809803cd2bc2434e312b19a18fa36776da12 (patch)
treeb4b43bd6538f51965ce32856e9c053d0f90919c8 /test/run-unit-tests.py
parentAdding upstream version 255.5. (diff)
downloadsystemd-fc53809803cd2bc2434e312b19a18fa36776da12.tar.xz
systemd-fc53809803cd2bc2434e312b19a18fa36776da12.zip
Adding upstream version 256.upstream/256
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xtest/run-unit-tests.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/run-unit-tests.py b/test/run-unit-tests.py
index e6f26c2..de8ac5c 100755
--- a/test/run-unit-tests.py
+++ b/test/run-unit-tests.py
@@ -28,6 +28,9 @@ def argument_parser():
help='run "unsafe" tests too')
p.add_argument('-A', '--artifact_directory',
help='store output from failed tests in this dir')
+ p.add_argument('-s', '--skip', action='append', default=[],
+ help='skip the named test')
+
return p
opts = argument_parser().parse_args()
@@ -42,9 +45,14 @@ if not opts.artifact_directory and os.getenv('ARTIFACT_DIRECTORY'):
opts.artifact_directory = os.getenv('ARTIFACT_DIRECTORY')
total.total = len(tests)
-for test in tests:
+for test in sorted(tests):
name = os.path.basename(test)
+ if name in opts.skip:
+ print(f'{YELLOW}SKIP: {name} (by user) {RESET_ALL}')
+ total.skip += 1
+ continue
+
ex = subprocess.run(test, stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
if ex.returncode == 0:
print(f'{GREEN}PASS: {name}{RESET_ALL}')