mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/ci/runner_py_consider_no_junit_report_as_succeeded' into 'master'
CI: runner py consider no test case as succeeded See merge request espressif/esp-idf!13098
This commit is contained in:
commit
af2139e0b6
@ -24,7 +24,8 @@
|
||||
script:
|
||||
- *define_config_file_name
|
||||
# first test if config file exists, if not exist, exit 0
|
||||
- test -e $CONFIG_FILE || exit 0
|
||||
- |
|
||||
{ [[ -e $CONFIG_FILE ]]; } || { echo 'No config file found. Consider decreasing the parallel count of this job in ".gitlab/ci/target-test.yml"'; exit 0; }
|
||||
# clone test env configs
|
||||
- retry_failed git clone $TEST_ENV_CONFIG_REPO
|
||||
- python $CHECKOUT_REF_SCRIPT ci-test-runner-configs ci-test-runner-configs
|
||||
|
@ -199,6 +199,7 @@ def test_method(**kwargs):
|
||||
junit_test_case = JunitReport.create_test_case(format_case_id(case_info['ID'],
|
||||
target=env_inst.default_dut_cls.TARGET))
|
||||
result = False
|
||||
unexpected_error = False
|
||||
try:
|
||||
Utility.console_log('starting running test: ' + test_func.__name__, color='green')
|
||||
# execute test function
|
||||
@ -209,6 +210,7 @@ def test_method(**kwargs):
|
||||
junit_test_case.add_failure_info(str(e))
|
||||
except Exception as e:
|
||||
Utility.handle_unexpected_exception(junit_test_case, e)
|
||||
unexpected_error = True
|
||||
finally:
|
||||
# do close all DUTs, if result is False then print DUT debug info
|
||||
close_errors = env_inst.close(dut_debug=(not result))
|
||||
@ -222,7 +224,7 @@ def test_method(**kwargs):
|
||||
for error in close_errors:
|
||||
junit_test_case.add_failure_info(str(error))
|
||||
result = False
|
||||
if not case_info['junit_report_by_case']:
|
||||
if not case_info['junit_report_by_case'] or unexpected_error:
|
||||
JunitReport.test_case_finish(junit_test_case)
|
||||
|
||||
# end case and output result
|
||||
|
Loading…
Reference in New Issue
Block a user