fix(ci): Remove unittest-xml-reporting dependency from host tests

This commit is contained in:
Roland Dobai 2023-11-29 10:43:19 +01:00
parent 6e38fea5e9
commit bc1d74bb88
9 changed files with 49 additions and 15 deletions

View File

@ -205,13 +205,13 @@ test_tools:
LC_ALL: C.UTF-8
script:
- stat=0
- cd ${IDF_PATH}/tools/ci
- python -m xmlrunner test_autocomplete.py --output-file=${IDF_PATH}/XUNIT_AUTOCOMP.xml || stat=1
- cd ${IDF_PATH}/tools/ci/test_autocomplete
- pytest --noconftest test_autocomplete.py --junitxml=${IDF_PATH}/XUNIT_AUTOCOMP.xml || stat=1
- cd ${IDF_PATH}/tools/test_idf_py
- python -m xmlrunner test_idf_py.py --output-file=${IDF_PATH}/XUNIT_IDF_PY.xml || stat=1
- python -m xmlrunner test_hints.py --output-file=${IDF_PATH}/XUNIT_HINTS.xml || stat=1
- pytest --noconftest test_idf_py.py --junitxml=${IDF_PATH}/XUNIT_IDF_PY.xml || stat=1
- pytest --noconftest test_hints.py --junitxml=${IDF_PATH}/XUNIT_HINTS.xml || stat=1
- cd ${IDF_PATH}/tools/test_mkdfu
- python -m xmlrunner test_mkdfu.py --output-file=${IDF_PATH}/XUNIT_MKDFU.xml || stat=1
- pytest --noconftest test_mkdfu.py --junitxml=${IDF_PATH}/XUNIT_MKDFU.xml || stat=1
- cd ${IDF_PATH}/tools/test_sbom
- pytest --junitxml=${IDF_PATH}/XUNIT_SBOM.xml || stat=1
- cd ${IDF_PATH}

View File

@ -126,7 +126,7 @@
- "components/**/*"
- "tools/ci/test_autocomplete.py"
- "tools/ci/test_autocomplete/*"
- "tools/mass_mfg/**/*"

View File

@ -77,7 +77,7 @@ tools/ci/get_supported_examples.sh
tools/ci/mirror-submodule-update.sh
tools/ci/multirun_with_pyenv.sh
tools/ci/push_to_github.sh
tools/ci/test_autocomplete.py
tools/ci/test_autocomplete/test_autocomplete.py
tools/ci/test_configure_ci_environment.sh
tools/ci/test_reproducible_build.sh
tools/docker/entrypoint.sh

View File

@ -34,7 +34,6 @@ tools/ci/python_packages/idf_iperf_test_util/LineChart.py
tools/ci/python_packages/idf_iperf_test_util/PowerControl.py
tools/ci/python_packages/idf_iperf_test_util/TestReport.py
tools/ci/python_packages/wifi_tools.py
tools/ci/test_autocomplete.py
tools/esp_app_trace/espytrace/apptrace.py
tools/esp_app_trace/espytrace/sysview.py
tools/esp_app_trace/logtrace_proc.py

View File

@ -0,0 +1,12 @@
[pytest]
addopts = -s -p no:pytest_embedded
# log related
log_cli = True
log_cli_level = INFO
log_cli_format = %(asctime)s %(levelname)s %(message)s
log_cli_date_format = %Y-%m-%d %H:%M:%S
## log all to `system-out` when case fail
junit_logging = stdout
junit_log_passing_tests = False

View File

@ -20,7 +20,7 @@ TESTS = (Test('fish', 'vt100', 'all.*app.*app-flash.*bootloader.*', 'fish'),
pargs = (pexpect.EOF, pexpect.TIMEOUT)
def get_fail_msg(pproc, msg, index):
def get_fail_msg(pproc: pexpect.spawn, msg: str, index: int) -> str:
try:
buf = pproc._buffer.getvalue()
except AttributeError:
@ -33,7 +33,7 @@ def get_fail_msg(pproc, msg, index):
class UTTest(unittest.TestCase):
def test_shell(self):
def test_shell(self) -> None:
idf_path = os.environ['IDF_PATH']
env = os.environ.copy()
for test in TESTS:

View File

@ -11,4 +11,3 @@ pyyaml
SimpleWebSocketServer
pylint-gitlab
minio
unittest-xml-reporting

View File

@ -0,0 +1,12 @@
[pytest]
addopts = -s -p no:pytest_embedded
# log related
log_cli = True
log_cli_level = INFO
log_cli_format = %(asctime)s %(levelname)s %(message)s
log_cli_date_format = %Y-%m-%d %H:%M:%S
## log all to `system-out` when case fail
junit_logging = stdout
junit_log_passing_tests = False

View File

@ -0,0 +1,12 @@
[pytest]
addopts = -s -p no:pytest_embedded
# log related
log_cli = True
log_cli_level = INFO
log_cli_format = %(asctime)s %(levelname)s %(message)s
log_cli_date_format = %Y-%m-%d %H:%M:%S
## log all to `system-out` when case fail
junit_logging = stdout
junit_log_passing_tests = False