adds a flag to exit if a test fails

Change-Id: Ifd23ca19abaef24e30e0bbd9e751f8a0ea8cf667

Merge branch 'master' of ssh://gitrw.chromium.org:9222/crosutils into fail-on-exit

Change-Id: I4e6270cc401a1450a6f2de6bc156e2dabc6d4334

BUG=none
TEST=tested both success and failure cases with and without the flag

Review URL: http://codereview.chromium.org/3150036
This commit is contained in:
Ryan Cairns 2010-08-25 14:30:18 -07:00
parent 4515028a2d
commit a1401f2f56

View File

@ -247,6 +247,9 @@ class ReportGenerator(object):
"""Runs report generation."""
self._CollectResults()
self._GenerateReportText()
for v in self._results.itervalues():
if v['status'] != 'PASS':
sys.exit(1)
def main():