mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
ci: use IDF_PATH as pytest log dir
This commit is contained in:
parent
a2c8a676a0
commit
5e05a1f174
@ -8,7 +8,7 @@
|
||||
when: always
|
||||
paths:
|
||||
- XUNIT_RESULT.xml
|
||||
- /tmp/pytest-embedded/
|
||||
- pytest_embedded_log/
|
||||
reports:
|
||||
junit: XUNIT_RESULT.xml
|
||||
expire_in: 1 week
|
||||
|
23
conftest.py
23
conftest.py
@ -12,11 +12,11 @@
|
||||
#
|
||||
# This is an experimental feature, and if you found any bug or have any question, please report to
|
||||
# https://github.com/espressif/pytest-embedded/issues
|
||||
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import xml.etree.ElementTree as ET
|
||||
from datetime import datetime
|
||||
from fnmatch import fnmatch
|
||||
from typing import Callable, List, Optional, Tuple
|
||||
|
||||
@ -61,6 +61,19 @@ def item_marker_names(item: Item) -> List[str]:
|
||||
############
|
||||
# Fixtures #
|
||||
############
|
||||
_TEST_SESSION_TMPDIR = os.path.join(
|
||||
os.path.dirname(__file__),
|
||||
'pytest_embedded_log',
|
||||
datetime.now().strftime('%Y-%m-%d_%H-%M-%S'),
|
||||
)
|
||||
os.makedirs(_TEST_SESSION_TMPDIR, exist_ok=True)
|
||||
|
||||
|
||||
@pytest.fixture(scope='session', autouse=True)
|
||||
def session_tempdir() -> str:
|
||||
return _TEST_SESSION_TMPDIR
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@parse_configuration
|
||||
def config(request: FixtureRequest) -> str:
|
||||
@ -79,9 +92,7 @@ def test_case_name(request: FixtureRequest, target: str, config: str) -> str:
|
||||
|
||||
@pytest.fixture
|
||||
@apply_count
|
||||
def build_dir(
|
||||
app_path: str, target: Optional[str], config: Optional[str]
|
||||
) -> str:
|
||||
def build_dir(app_path: str, target: Optional[str], config: Optional[str]) -> str:
|
||||
"""
|
||||
Check local build dir with the following priority:
|
||||
|
||||
@ -245,7 +256,9 @@ class IdfPytestEmbedded:
|
||||
for _target in [*SUPPORTED_TARGETS, *PREVIEW_TARGETS]:
|
||||
item.add_marker(_target)
|
||||
# FIXME: temporarily modify the s3 runner tag "generic" to "s3_generic" due to the deep sleep bug
|
||||
if 'generic' in item_marker_names(item) and 'esp32s3' in item_marker_names(item):
|
||||
if 'generic' in item_marker_names(item) and 'esp32s3' in item_marker_names(
|
||||
item
|
||||
):
|
||||
item.add_marker('generic_s3_fixme')
|
||||
|
||||
# filter all the test cases with "--target"
|
||||
|
Loading…
Reference in New Issue
Block a user