| 1155 | return test_id_string |
| 1156 | |
| 1157 | def test_teardown(self, run_obj, exit_status, test_id_string): |
| 1158 | if not self.env['dry_run']: |
| 1159 | if exit_status == 0: |
| 1160 | test_result = TestResult.PASS |
| 1161 | else: |
| 1162 | test_result = TestResult.FAIL |
| 1163 | if self.env['quit_on_fail']: |
| 1164 | self.log_error('Test failed') |
| 1165 | sys.exit(1) |
| 1166 | self.log_info('test_result {}'.format(test_result.name)) |
| 1167 | ellapsed_seconds = run_obj.ellapsed_seconds |
| 1168 | else: |
| 1169 | test_result = None |
| 1170 | ellapsed_seconds = None |
| 1171 | self.log_info() |
| 1172 | self.tests.append(Test(test_id_string, test_result, ellapsed_seconds)) |
| 1173 | |
| 1174 | def teardown(self): |
| 1175 | ''' |