forked from espressif/esp-idf
Merge branch 'ci/fix_multi_dut_real_test_case_missing_issue' into 'master'
ci(pytest): fix multi-dut missing c test case in the junit report issue See merge request espressif/esp-idf!24418
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
import logging
|
||||||
|
import os
|
||||||
import time
|
import time
|
||||||
from multiprocessing import Manager, Process, Semaphore
|
from multiprocessing import Manager, Process, Semaphore
|
||||||
from multiprocessing.managers import SyncManager
|
from multiprocessing.managers import SyncManager
|
||||||
@@ -304,6 +306,13 @@ class MultiDevCaseTester(BaseTester):
|
|||||||
break
|
break
|
||||||
|
|
||||||
# The case finished, release the semaphore to unblock the '_wait_multi_dev_case_finish'
|
# The case finished, release the semaphore to unblock the '_wait_multi_dev_case_finish'
|
||||||
|
#
|
||||||
|
# Manually to create the real test case junit report
|
||||||
|
# The child process attributes won't be reflected to the parent one.
|
||||||
|
junit_report = os.path.splitext(dut.logfile)[0] + f'_{case.index}_{sub_case_index}.xml'
|
||||||
|
dut.testsuite.dump(junit_report)
|
||||||
|
logging.info(f'Created unity output junit report: {junit_report}')
|
||||||
|
|
||||||
dev_res.sem.release()
|
dev_res.sem.release()
|
||||||
|
|
||||||
def run_all_multi_dev_cases(self, reset: bool = False, timeout: int = 60) -> None:
|
def run_all_multi_dev_cases(self, reset: bool = False, timeout: int = 60) -> None:
|
||||||
|
Reference in New Issue
Block a user