mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
tests: Translate skips into error code 77
This makes the meson output nicer, as it will correctly display that the test has been skipped. It only happens if all tests in the run were skipped, but meson always does one test a time.
This commit is contained in:
@ -1485,4 +1485,12 @@ if __name__ == '__main__':
|
||||
print("%s %s" % (machine, human), end="\n")
|
||||
sys.exit(0)
|
||||
|
||||
unittest.main(verbosity=2)
|
||||
prog = unittest.main(verbosity=2, exit=False)
|
||||
if prog.result.errors or prog.result.failures:
|
||||
sys.exit(1)
|
||||
|
||||
# Translate to skip error
|
||||
if prog.result.testsRun == len(prog.result.skipped):
|
||||
sys.exit(77)
|
||||
|
||||
sys.exit(0)
|
||||
|
||||
Reference in New Issue
Block a user