Skip to content

Commit 138a094

Browse files
committed
Merge branch 'ci/fixes' into 'master'
ci: a few fixes Closes IDFCI-3018 See merge request espressif/esp-idf!40610
2 parents 4324c48 + d4cc559 commit 138a094

File tree

14 files changed

+48
-27
lines changed

14 files changed

+48
-27
lines changed

.gitlab/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
/.github/workflows/ @esp-idf-codeowners/ci
5252
/.gitlab-ci.yml @esp-idf-codeowners/ci
5353
/.gitlab/ci/ @esp-idf-codeowners/ci
54+
/.idf_build_apps.toml @esp-idf-codeowners/ci
55+
/.idf_ci.toml @esp-idf-codeowners/ci
5456
/.pre-commit-config.yaml @esp-idf-codeowners/ci
5557
/.readthedocs.yml @esp-idf-codeowners/docs
5658
/.vale.ini @esp-idf-codeowners/docs

.gitlab/ci/host-test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,13 +300,11 @@ test_pytest_qemu:
300300
- run_cmd idf-ci build run
301301
--build-system cmake
302302
--target $IDF_TARGET
303-
--only-test-related
304303
-m qemu
305304
--modified-files ${MR_MODIFIED_FILES}
306305
- run_cmd idf-ci gitlab download-known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
307306
- run_cmd pytest
308307
--target $IDF_TARGET
309-
--log-cli-level DEBUG
310308
-m qemu
311309
--embedded-services idf,qemu
312310
--junitxml=XUNIT_RESULT.xml

.idf_build_apps.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ ignore_warning_files = [
2121

2222
build_dir = "build_@t_@w"
2323
build_log_filename = "build_log.txt"
24-
size_json_filename = "size.json"
24+
size_json_filename = "size_${CI_JOB_ID}.json"
2525

2626
verbose = 1 # INFO
2727

2828
# collect
2929
collect_app_info_filename = "app_info_${CI_JOB_NAME_SLUG}.txt"
30-
collect_size_info_filename = "size_info_${CI_JOB_NAME_SLUG}.txt" # TODO remove this file when ci-dashboard is ready
3130
junitxml = "build_summary_${CI_JOB_NAME_SLUG}.xml"
3231

3332
# manifest

.idf_ci.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ patterns = [
7474
bucket = "idf-artifacts"
7575
patterns = [
7676
'**/build*/build_log.txt',
77-
'**/build*/size.json',
77+
'**/build*/size*.json',
7878
]
7979

8080
[gitlab.artifacts.s3.junit]

components/esp_driver_usb_serial_jtag/test_apps/usb_serial_jtag_vfs/pytest_usb_serial_jtag_vfs.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
],
1414
indirect=True,
1515
)
16-
@pytest.mark.parametrize('test_message', ['test123456789!@#%^&*'])
1716
@idf_parametrize('target', ['esp32s3', 'esp32c3', 'esp32c6', 'esp32h2'], indirect=['target'])
18-
def test_usj_vfs_select(dut: Dut, test_message: list) -> None:
17+
def test_usj_vfs_select(dut: Dut) -> None:
18+
test_message = 'test123456789!@#%^&*'
19+
1920
dut.expect_exact('Press ENTER to see the list of tests')
2021
dut.write('"test select read, write and timeout"')
2122
dut.expect_exact('select timed out', timeout=2)
@@ -32,9 +33,10 @@ def test_usj_vfs_select(dut: Dut, test_message: list) -> None:
3233
],
3334
indirect=True,
3435
)
35-
@pytest.mark.parametrize('test_message', ['!(@*#&(!*@&#((SDasdkjhad\nce'])
3636
@idf_parametrize('target', ['esp32s3', 'esp32c3', 'esp32c6', 'esp32h2'], indirect=['target'])
37-
def test_usj_vfs_read_return(dut: Dut, test_message: list) -> None:
37+
def test_usj_vfs_read_return(dut: Dut) -> None:
38+
test_message = '!(@*#&(!*@&#((SDasdkjhad\nce'
39+
3840
dut.expect_exact('Press ENTER to see the list of tests')
3941
dut.write('"read does not return on new line character"')
4042
dut.expect_exact('ready to receive', timeout=2)
@@ -50,9 +52,10 @@ def test_usj_vfs_read_return(dut: Dut, test_message: list) -> None:
5052
],
5153
indirect=True,
5254
)
53-
@pytest.mark.parametrize('test_message', ['testdata'])
5455
@idf_parametrize('target', ['esp32s3', 'esp32c3', 'esp32c6', 'esp32h2'], indirect=['target'])
55-
def test_usj_vfs_read_blocking(dut: Dut, test_message: list) -> None:
56+
def test_usj_vfs_read_blocking(dut: Dut) -> None:
57+
test_message = 'testdata'
58+
5659
dut.expect_exact('Press ENTER to see the list of tests')
5760
dut.write('"blocking read returns with available data"')
5861
dut.expect_exact('ready to receive', timeout=2)

components/esp_vfs_console/test_apps/usb_cdc_vfs/pytest_usb_cdc_vfs.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
],
1414
indirect=True,
1515
)
16-
@pytest.mark.parametrize('test_message', ['test123456789!@#%^&*'])
1716
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
18-
def test_usb_cdc_vfs_default(dut: Dut, test_message: str) -> None:
17+
def test_usb_cdc_vfs_default(dut: Dut) -> None:
18+
test_message = 'test123456789!@#%^&*'
19+
1920
# test run: test_usb_cdc_select
2021
dut.expect_exact('test_usb_cdc_select', timeout=2)
2122
dut.expect_exact('select timed out', timeout=2)

conftest.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import time
2727
import typing as t
2828
from copy import deepcopy
29-
from telnetlib import Telnet
3029
from urllib.parse import quote
3130

3231
import common_test_methods # noqa: F401
@@ -48,6 +47,7 @@
4847
from pytest_embedded.utils import to_str
4948
from pytest_embedded_idf.dut import IdfDut
5049
from pytest_embedded_idf.unity_tester import CaseTester
50+
from pytest_embedded_jtag._telnetlib.telnetlib import Telnet # python 3.13 removed telnetlib, use this instead
5151

5252

5353
############
@@ -300,13 +300,19 @@ def build_dir(
300300
"""
301301
# download from minio on CI
302302
case: PytestCase = request.node.stash[IDF_CI_PYTEST_CASE_KEY]
303-
if app_downloader:
303+
if 'skip_app_downloader' in case.all_markers:
304+
logging.debug('skip_app_downloader marker found, skip downloading app')
305+
downloader = None
306+
else:
307+
downloader = app_downloader
308+
309+
if downloader:
304310
# somehow hardcoded...
305311
app_build_path = os.path.join(idf_relpath(app_path), f'build_{target}_{config}')
306312
if requires_elf_or_map(case):
307-
app_downloader.download_app(app_build_path)
313+
downloader.download_app(app_build_path)
308314
else:
309-
app_downloader.download_app(app_build_path, 'flash')
315+
downloader.download_app(app_build_path, 'flash')
310316
check_dirs = [f'build_{target}_{config}']
311317
else:
312318
check_dirs = []

examples/openthread/pytest_otbr.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
import re
88
import secrets
99
import subprocess
10+
import sys
1011
import threading
1112
import time
1213
from typing import Tuple
1314

15+
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
1416
import ot_ci_function as ocf
1517
import pexpect
1618
import pytest

examples/protocols/esp_http_client/pytest_esp_http_client.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,6 @@ def test_examples_protocol_esp_http_client_dynamic_buffer(dut: Dut) -> None:
109109

110110

111111
@pytest.mark.host_test
112-
# Currently we are just testing the build for esp_http_client on Linux target. So skipping the test run.
113-
# Later we will enable the test run for Linux target as well.
114-
@pytest.mark.skipif('config.getvalue("target") == "linux"', reason='Do not run on Linux')
115112
@pytest.mark.parametrize(
116113
'config',
117114
[
@@ -121,5 +118,11 @@ def test_examples_protocol_esp_http_client_dynamic_buffer(dut: Dut) -> None:
121118
indirect=True,
122119
)
123120
@idf_parametrize('target', ['linux'], indirect=['target'])
124-
def test_examples_protocol_esp_http_client_linux(dut: Dut) -> None:
121+
def test_examples_protocol_esp_http_client_linux(target: str, dut: Dut) -> None:
122+
if target == 'linux':
123+
pytest.skip(
124+
'Currently we are just testing the build for esp_http_client on Linux target. '
125+
'So skipping the test run. Later we will enable the test run for Linux target as well.'
126+
)
127+
125128
dut.expect('Finish http example', timeout=60)

pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ junit_log_passing_tests = False
3939
markers =
4040
temp_skip_ci: mark test to be skipped in CI
4141
temp_skip: mark test to be skipped in CI and locally
42+
skip_app_downloader: mark test required apps built locally, not downloaded from CI
4243
require_elf: mark test to be skipped if no elf file is found
4344

4445
env_markers =

0 commit comments

Comments
 (0)