osmo-gsm-tester.py: return error on failure
Change-Id: I1d2133b5a2eeaede1eb9b321aa17843ce4bd06d2
This commit is contained in:
parent
eafdbb2fb2
commit
ef42cb51fa
|
@ -145,10 +145,33 @@ if __name__ == '__main__':
|
|||
t.verify()
|
||||
trials.append(t)
|
||||
|
||||
trials_passed = []
|
||||
trials_failed = []
|
||||
|
||||
for current_trial in trials:
|
||||
with current_trial:
|
||||
suites_passed = 0
|
||||
suites_failed = 0
|
||||
for suite_def, scenarios in suite_scenarios:
|
||||
suite_run = suite.SuiteRun(current_trial, suite_def, scenarios)
|
||||
suite_run.run_tests(test_names)
|
||||
result = suite_run.run_tests(test_names)
|
||||
if result.all_passed:
|
||||
suites_passed += 1
|
||||
suite_run.log('PASS')
|
||||
else:
|
||||
suites_failed += 1
|
||||
suite_run.err('FAIL')
|
||||
if not suites_failed:
|
||||
current_trial.log('PASS')
|
||||
trials_passed.append(current_trial.name())
|
||||
else:
|
||||
current_trial.err('FAIL')
|
||||
trials_failed.append(current_trial.name())
|
||||
|
||||
if trials_passed:
|
||||
print('Trials passed:\n ' + ('\n '.join(trials_passed)))
|
||||
if trials_failed:
|
||||
print('Trials failed:\n ' + ('\n '.join(trials_failed)))
|
||||
exit(1)
|
||||
|
||||
# vim: expandtab tabstop=4 shiftwidth=4
|
||||
|
|
Loading…
Reference in New Issue