mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
test: Mark tests as skipped if requirements were not satisfied
Instead of not creating the test at all, let's always create test but simply mark them as skipped as this is more observable than simply not creating the test at all.
This commit is contained in:
@@ -365,6 +365,7 @@ def main() -> None:
|
||||
parser.add_argument('--coredump-exclude-regex', required=True)
|
||||
parser.add_argument('--sanitizer-exclude-regex', required=True)
|
||||
parser.add_argument('--rtc', action=argparse.BooleanOptionalAction)
|
||||
parser.add_argument('--skip', action=argparse.BooleanOptionalAction)
|
||||
parser.add_argument('mkosi_args', nargs='*')
|
||||
args = parser.parse_args()
|
||||
|
||||
@@ -386,6 +387,10 @@ def main() -> None:
|
||||
print(f'TEST_NO_QEMU=1, skipping {args.name}', file=sys.stderr)
|
||||
exit(77)
|
||||
|
||||
if args.skip:
|
||||
print(f'meson requirements for test {args.name} were not fulfilled, skipping', file=sys.stderr)
|
||||
exit(77)
|
||||
|
||||
for s in os.getenv('TEST_SKIP', '').split():
|
||||
if s in args.name:
|
||||
print(f'Skipping {args.name} due to TEST_SKIP', file=sys.stderr)
|
||||
|
||||
Reference in New Issue
Block a user