diff --git a/test/run-unit-tests.py b/test/run-unit-tests.py index 314182d980a..4b180cc8df0 100755 --- a/test/run-unit-tests.py +++ b/test/run-unit-tests.py @@ -2,7 +2,6 @@ # SPDX-License-Identifier: LGPL-2.1-or-later import argparse -import glob import os import pathlib import subprocess @@ -33,9 +32,11 @@ def argument_parser(): opts = argument_parser().parse_args() -tests = glob.glob('/usr/lib/systemd/tests/test-*') +unittestdir = pathlib.Path(__file__).parent.absolute() + +tests = list(unittestdir.glob('test-*')) if opts.unsafe: - tests += glob.glob('/usr/lib/systemd/tests/unsafe/test-*') + tests += unittestdir.glob('unsafe/test-*') if not opts.artifact_directory and os.getenv('ARTIFACT_DIRECTORY'): opts.artifact_directory = os.getenv('ARTIFACT_DIRECTORY')