mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
On failure tests-runner should do non-zero exit
Right now test runner will always exit(0). It's helpful to have zfs-tests.sh provide different exit values depending on if everything passed or not. We can then use common shell cmds to run tests until failure. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> Signed-off-by: Alek Pinchuk <apinchuk@datto.com> Closes #6285
This commit is contained in:
parent
b81a1c61ec
commit
fe46eebe6b
@ -13,6 +13,7 @@
|
||||
|
||||
#
|
||||
# Copyright (c) 2012, 2015 by Delphix. All rights reserved.
|
||||
# Copyright (c) 2017 Datto Inc.
|
||||
#
|
||||
|
||||
import ConfigParser
|
||||
@ -702,7 +703,7 @@ class TestRun(object):
|
||||
|
||||
def summary(self):
|
||||
if Result.total is 0:
|
||||
return
|
||||
return 2
|
||||
|
||||
print '\nResults Summary'
|
||||
for key in Result.runresults.keys():
|
||||
@ -716,6 +717,10 @@ class TestRun(object):
|
||||
float(Result.total)) * 100)
|
||||
print 'Log directory:\t%s' % self.outputdir
|
||||
|
||||
if Result.runresults['FAIL'] > 0:
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
def verify_file(pathname):
|
||||
"""
|
||||
@ -871,8 +876,7 @@ def main():
|
||||
|
||||
testrun.complete_outputdirs()
|
||||
testrun.run(options)
|
||||
testrun.summary()
|
||||
exit(0)
|
||||
exit(testrun.summary())
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
Reference in New Issue
Block a user