mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
run-unit-tests: add option to run unsafe tests too
This commit is contained in:
parent
3762f8e316
commit
f5acf84dbe
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import dataclasses
|
||||
import glob
|
||||
import os
|
||||
@ -22,7 +23,18 @@ class Total:
|
||||
skip:int = 0
|
||||
fail:int = 0
|
||||
|
||||
def argument_parser():
|
||||
p = argparse.ArgumentParser()
|
||||
p.add_argument('-u', '--unsafe', action='store_true',
|
||||
help='run "unsafe" tests too')
|
||||
return p
|
||||
|
||||
opts = argument_parser().parse_args()
|
||||
|
||||
tests = glob.glob('/usr/lib/systemd/tests/test-*')
|
||||
if opts.unsafe:
|
||||
tests += glob.glob('/usr/lib/systemd/tests/unsafe/test-*')
|
||||
|
||||
total = Total(total=len(tests))
|
||||
for test in tests:
|
||||
name = os.path.basename(test)
|
||||
|
Loading…
Reference in New Issue
Block a user